/* MathHub Tutoring - Math Tutoring Website */
/* Color palette: Deep teal, warm amber, cream backgrounds */

:root {
    --color-bg: #faf8f5;
    --color-bg-alt: #f0ebe4;
    --color-primary: #0d5c63;
    --color-primary-dark: #084347;
    --color-accent: #e07c24;
    --color-accent-soft: #f4a259;
    --color-text: #2d2a26;
    --color-text-muted: #6b6560;
    --color-white: #ffffff;
    --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 2px 8px rgba(13, 92, 99, 0.06);
    --shadow-md: 0 8px 24px rgba(13, 92, 99, 0.1);
    --shadow-lg: 0 16px 48px rgba(13, 92, 99, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(13, 92, 99, 0.08);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.logo-icon {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 500;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-accent:hover {
    background: #c96b1a;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(224, 124, 36, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
}

.btn-ghost:hover {
    color: var(--color-primary);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(13, 92, 99, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13, 92, 99, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.floating-shapes {
    position: absolute;
    inset: 0;
}

.shape {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    color: rgba(13, 92, 99, 0.08);
    animation: float 12s ease-in-out infinite;
}

.shape-1 { top: 15%; left: 10%; animation-delay: 0s; }
.shape-2 { top: 60%; right: 15%; animation-delay: -3s; }
.shape-3 { bottom: 20%; left: 20%; animation-delay: -6s; }
.shape-4 { top: 30%; right: 25%; animation-delay: -9s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -10px) rotate(5deg); }
    66% { transform: translate(-5px, 5px) rotate(-3deg); }
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(224, 124, 36, 0.15);
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 100px;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

.hero h1 em {
    font-style: italic;
    color: var(--color-accent);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    margin-bottom: 1.5rem;
}

.hero-image img {
    width: 100%;
    max-width: 560px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* Sections */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 3rem;
}

/* How it Works */
.how-it-works {
    background: var(--color-bg-alt);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-number {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Subjects */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.subject-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.subject-card:hover {
    border-color: var(--color-accent-soft);
    box-shadow: var(--shadow-md);
}

.subject-icon {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 500;
    color: var(--color-primary);
    display: block;
    margin-bottom: 1rem;
}

.subject-card h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.subject-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Pricing */
.pricing {
    background: var(--color-bg-alt);
}

.pricing-note {
    text-align: center;
    color: var(--color-accent);
    font-weight: 600;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.pricing-card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.pricing-card:hover {
    box-shadow: var(--shadow-md);
}

.pricing-card.featured {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 1rem;
    border-radius: 100px;
}

.pricing-card h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.pricing-card .amount {
    font-weight: 700;
    font-size: 2rem;
    color: var(--color-primary);
}

.pricing-card > p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.pricing-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.pricing-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
}

/* Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial {
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-accent);
}

.testimonial p {
    font-size: 1.05rem;
    color: var(--color-text);
    margin-bottom: 1rem;
    font-style: italic;
}

.testimonial footer {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 5rem 2rem;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cta .btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
}

.cta .btn-primary:hover {
    background: var(--color-accent-soft);
    color: var(--color-white);
}

/* Footer */
.footer {
    background: var(--color-primary-dark);
    color: var(--color-white);
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer .logo {
    color: var(--color-white);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-location {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.5rem 0;
}

.footer-contact {
    font-size: 0.9rem;
    margin: 0.25rem 0 0.5rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-contact a:hover {
    color: var(--color-white);
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Content pages (About, Privacy) */
.content-page {
    max-width: 680px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: 2rem;
}

.content-block h2 {
    font-size: 1.35rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.content-block p,
.content-block li {
    color: var(--color-text-muted);
    line-height: 1.7;
}

.content-block ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.content-block a {
    color: var(--color-primary);
}

.content-block a:hover {
    text-decoration: underline;
}

/* Videos page */
.video-list {
    max-width: 800px;
    margin: 0 auto;
}

.video-item {
    margin-bottom: 2.5rem;
}

.video-item h3 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: var(--color-primary-dark);
    border-radius: var(--radius-md);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-item > p {
    margin-top: 0.75rem;
}

.video-item > p a {
    font-size: 0.95rem;
    color: var(--color-primary);
}

.video-item > p a:hover {
    text-decoration: underline;
}

/* Page layouts (Find Tutor, Demo, Book, Login) */
.page-main {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.page-hero {
    text-align: center;
    padding: 3rem 2rem 2rem;
}

.page-hero h1 {
    font-size: 2.25rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.page-hero .direct-contact {
    margin-top: 1rem;
    font-size: 1rem;
}

.page-hero .direct-contact a {
    color: var(--color-primary);
    font-weight: 600;
}

.page-hero .direct-contact a:hover {
    text-decoration: underline;
}

.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

/* Find Your Tutor */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.6rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    border: 2px solid rgba(13, 92, 99, 0.2);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text);
}

.tutor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.tutor-card {
    background: var(--color-white);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.tutor-card:hover {
    box-shadow: var(--shadow-md);
}

.tutor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.tutor-card h3 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.tutor-subjects {
    font-size: 0.9rem;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tutor-bio {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tutor-rating {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Booking form */
.booking-form {
    max-width: 480px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    border: 2px solid rgba(13, 92, 99, 0.2);
    border-radius: var(--radius-sm);
    background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group textarea {
    resize: vertical;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--color-accent);
    margin-top: 0.35rem;
}

.booking-form .btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Login */
.login-card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    font-size: 1.75rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.link-forgot {
    font-size: 0.9rem;
    color: var(--color-accent);
}

.link-forgot:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.login-footer a {
    color: var(--color-primary);
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-links,
    .nav-actions {
        display: none;
    }

    body.menu-open .nav {
        flex-wrap: wrap;
    }

    body.menu-open .nav-links,
    body.menu-open .nav-actions {
        display: flex;
        flex-basis: 100%;
        order: 10;
        flex-direction: column;
        padding: 1.5rem 0;
        gap: 1rem;
        border-top: 1px solid rgba(13, 92, 99, 0.1);
    }

    body.menu-open .nav-links {
        padding-top: 1.5rem;
    }

    body.menu-open .nav-actions {
        padding-bottom: 1.5rem;
        gap: 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle span {
        transition: transform 0.2s, opacity 0.2s;
    }

    .menu-toggle span:nth-child(1),
    .menu-toggle span:nth-child(3) {
        transform-origin: center;
    }

    body.menu-open .menu-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    body.menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.menu-open .menu-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .subject-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav {
        padding: 1rem 1.25rem;
    }

    .hero {
        padding: 6rem 1.25rem 3rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section {
        padding: 3rem 1.25rem;
    }

    .subject-grid {
        grid-template-columns: 1fr;
    }
}
