/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    color: #2c3e50;
    padding: 0.75rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border-bottom: 1px solid #e8e8e8;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
    max-width: 200px;
}

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

.nav-links a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: #3498db;
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Page headers */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Filters */
.filters {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.filter-form {
    width: 100%;
}

/* Quick Location Filters */
.quick-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e9ecef;
}

.quick-filters-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.9rem;
}

.location-chip,
.location-type-chip {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.location-chip:hover,
.location-type-chip:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

.location-chip.active,
.location-type-chip.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.location-chip.active:hover,
.location-type-chip.active:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-input,
.filter-select {
    flex: 1;
    min-width: 160px;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

/* Job Cards */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.job-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.job-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.job-card-featured {
    border: 3px solid #FF9800;
    background: linear-gradient(to right, #fff8f0 0%, white 100%);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25);
    position: relative;
}

.job-card-featured:hover {
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.35);
    transform: translateY(-2px);
}

.job-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF9800 0%, #FFB74D 50%, #FF9800 100%);
    border-radius: 8px 8px 0 0;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.job-title {
    font-size: 1.5rem;
    margin: 0;
}

.job-title a {
    color: #2c3e50;
    text-decoration: none;
}

.job-title a:hover {
    color: #3498db;
}

.job-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.job-updated {
    color: #95a5a6;
    font-size: 0.85rem;
}

.job-date-separator {
    color: #bdc3c7;
}

.job-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.job-meta span {
    color: #7f8c8d;
}

.company a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.company a:hover {
    text-decoration: underline;
}

.job-description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.job-actions {
    display: flex;
    gap: 1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-new {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

.badge-featured {
    background-color: #e8f4fd;
    color: #0066cc;
    border: 2px solid #3498db;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.badge-remote {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-hybrid {
    background-color: #fff3e0;
    color: #e65100;
}

.badge-onsite {
    background-color: #e3f2fd;
    color: #1565c0;
}

.badge-funding {
    background-color: #f3e5f5;
    color: #6a1b9a;
}

.badge-secondary {
    background-color: #e0e0e0;
    color: #616161;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-number {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background-color: #f5f7fa;
    border-color: #3498db;
    color: #3498db;
}

.page-number.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: 600;
    cursor: default;
}

.page-info {
    font-weight: 500;
}

/* Job Detail Page */
.job-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.breadcrumb {
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.job-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.job-company {
    margin-bottom: 1.5rem;
}

.job-company h2 {
    font-size: 1.5rem;
    display: inline;
    margin-right: 1rem;
}

.job-company a {
    color: #3498db;
    text-decoration: none;
}

.job-meta-detail {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.meta-item {
    margin-bottom: 0.75rem;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.job-content {
    margin-top: 2rem;
}

.job-content h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.job-description-full {
    line-height: 1.8;
    color: #555;
}

.job-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
}

/* Company Detail */
.company-header {
    margin-bottom: 2rem;
}

.company-meta {
    margin: 1rem 0;
}

.funding-info {
    margin: 0.5rem 0;
}

.company-link {
    display: inline-block;
    margin: 0.5rem 0;
    color: #3498db;
    text-decoration: none;
}

/* Admin Page */
.admin-page {
    max-width: 1400px;
    margin: 0 auto;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #7f8c8d;
    font-size: 1rem;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* Forms */
.admin-form {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

/* Footer */
.footer {
    background-color: #ffffff;
    color: #6c757d;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    border-top: 1px solid #e8e8e8;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 24px 32px;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.hero-left {
    flex: 1;
    min-width: 0;
}

.hero-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.hero-jobs-count {
    font-size: 0.9rem;
    color: #e74c3c;
    font-weight: 600;
    margin: 0 0 6px;
}

.hero-headline {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.2;
    margin: 0 0 8px;
}

.hero-highlight {
    color: #667eea;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    max-width: 420px;
}

.hero-subscribe-form {
    display: flex;
    gap: 8px;
}

.hero-email-input {
    padding: 11px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    width: 240px;
    outline: none;
    transition: border-color 0.2s;
}

.hero-email-input:focus {
    border-color: #667eea;
}

.hero-btn {
    padding: 11px 22px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
}

.hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hero-btn-subscribe {
    background: #667eea;
    color: white;
}

.hero-btn-post {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    display: inline-block;
    text-align: center;
    align-self: stretch;
}

.hero-newsletter-msg {
    font-size: 13px;
    min-height: 18px;
}

/* Logo Marquee Carousel */
.logo-marquee {
    margin: 0 0 2rem;
    padding: 16px 0 20px;
    background: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    border-top: 1px solid #f0f0f0;
}

.logo-marquee-label {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.logo-marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

.logo-marquee:hover .logo-marquee-track {
    animation-play-state: paused;
}

.logo-marquee-set {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 0 24px;
}

.logo-marquee-set img {
    height: 32px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.55;
    transition: all 0.3s;
}

.logo-marquee-set img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width: 768px) {
    .logo-img {
        height: 40px;
        max-width: 160px;
    }

    .quick-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .location-chip {
        font-size: 0.85rem;
        padding: 0.35rem 0.85rem;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-input,
    .filter-select {
        min-width: 100%;
    }

    .job-header {
        flex-direction: column;
    }

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

    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 20px;
    }

    .hero-right {
        align-items: stretch;
        width: 100%;
    }

    .hero-headline {
        font-size: 1.5rem;
    }

    .hero-subscribe-form {
        flex-direction: column;
        width: 100%;
    }

    .hero-email-input {
        width: 100%;
    }

    .hero-btn {
        width: 100%;
        text-align: center;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

}
