/* style.css — minimal responsive layout */

/* minimal job list styles */
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial; background:#f7f8fa; color:#222; }
.wrap { max-width:1100px; margin:0 auto; padding:18px; }

/* Ensure job headline color is visible with better contrast */
.job-card h3 a {
    color: #6a1b9a !important; /* Override any inline styles */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    background: #fff; /* Ensure background contrast */
    display: block; /* Prevent overlap */
    padding: 2px 0; /* Add slight padding for readability */
}
.job-card h3 a:hover {
    color: #6a1b9a !important; /* Lock to base color */
    text-decoration: none !important; /* No underline */
    background: #fff !important; /* Keep white background on hover */
}

:root {
    --wrap: 1100px;
    --accent: #6a1b9a;
    --bg: #f8f9fa;
    --text: #333;
    --radius: 8px;
    --shadow: 0 2px 6px rgba(0,0,0,0.1);
    --font: 'Segoe UI', Tahoma, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    position: relative; /* For fixed home button */
}

header {
    background: var(--accent);
    color: #fff;
    padding: 1rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

main {
    max-width: var(--wrap);
    margin: auto;
    padding: 1rem;
}

.job-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.job-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.job-card h3 {
    margin: 0 0 0.5rem 0;
    color: #6a1b9a; /* Fallback color */
    overflow: hidden; /* Prevent overflow */
    text-overflow: ellipsis; /* Truncate with ellipsis if too long */
    white-space: nowrap; /* Single line */
}

.job-card .job-info {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.job-card .job-desc {
    color: #333;
    font-size: 0.85rem;
    flex-grow: 1;
    overflow: hidden; /* Prevent overflow */
    text-overflow: ellipsis; /* Truncate with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

/* Ensure full description on job detail page */
.job-detail .description {
    overflow: visible !important; /* Override any inherited truncation */
    text-overflow: clip !important;
    white-space: pre-wrap !important; /* Preserve line breaks and wrap text */
    word-wrap: break-word !important; /* Break long words */
    -webkit-line-clamp: unset !important; /* Remove line limit */
    -webkit-box-orient: unset !important; /* Reset orientation */
    margin-bottom: 1rem;
    font-size: 0.95rem; /* Improve readability */
}

.job-card a {
    margin-top: auto;
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: var(--radius);
    transition: background 0.2s ease;
    text-align: center;
}

.job-card a:hover:not(.job-card h3 a) { /* Apply hover only to apply button */
    background: #4c1480; /* Restore original hover effect */
}

.job-detail {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.job-detail h1 {
    color: var(--accent);
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .job-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    header {
        font-size: 1.2rem;
    }
    .job-card h3 {
        font-size: 1rem;
    }
}

/* Ensure no hover effect on title links */
.job-card h3 a:hover,
.job-detail h1:hover {
    color: #6a1b9a !important; /* Lock to base color */
    text-decoration: none !important; /* No underline */
    background: #fff !important; /* Keep white background */
}