/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #64748b;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-text: #1e293b;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-border);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
}

/* Navbar */
.navbar {
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
}

/* Footer */
.footer {
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--color-text-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

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

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Section */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-text-light);
}

/* How It Works */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--color-text-light);
}

/* Interviewer Cards */
.interviewers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.interviewer-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.interviewer-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.interviewer-photo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.interviewer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
}

.interviewer-info h3 {
    margin-bottom: 0.25rem;
}

.hourly-rate {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    background-color: var(--color-bg-alt);
    color: var(--color-text-light);
}

.tag-tech {
    background-color: #dbeafe;
    color: #1e40af;
}

.tag-subject {
    background-color: #dcfce7;
    color: #166534;
}

.tag-language {
    background-color: #ede9fe;
    color: #5b21b6;
}

.companies {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.companies .company::after {
    content: ', ';
}

.companies .company:last-child::after {
    content: '';
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-bg);
    font-size: 1rem;
}

/* Modal */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1rem;
}

.modal {
    background-color: var(--color-bg);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

.form-error {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Messages / Alerts */
.messages {
    padding: 1rem;
}

.message {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.message-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Dashboard */
.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 80px);
}

.dashboard-sidebar {
    background-color: var(--color-bg-alt);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem;
}

.dashboard-nav {
    list-style: none;
}

.dashboard-nav li {
    margin-bottom: 0.5rem;
}

.dashboard-nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--color-text);
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background-color: var(--color-bg);
    text-decoration: none;
}

.dashboard-content {
    padding: 2rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

/* Booking Cards */
.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.booking-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-info h4 {
    margin-bottom: 0.25rem;
}

.booking-date {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.booking-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background-color: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Testimonials */
.testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

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

.testimonial-author {
    font-weight: 600;
}

.testimonial-role {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

/* Companies Section */
.companies-section {
    text-align: center;
}

.company-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.company-logos span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-light);
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .booking-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}
