/* ============ RESET & BASE ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* ============ HEADER & NAVIGATION ============ */
.header {
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    margin-bottom: 1.5rem;
}

.logo {
    width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.nav a {
    display: inline-block;
    margin: 0 1rem;
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #0056b3;
}

/* ============ COMMON LAYOUT ============ */
.main-content {
    margin: 3rem auto;
    padding: 0 1rem;
    text-align: center;
}

.form-container {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.form-container h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.back-home {
    text-align: center;
    margin-top: 3rem;
    font-size: 1.1rem;
}
.latest-jobs {
    margin-top: 4rem;
    text-align: center;
}

.latest-jobs h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
}
.btn-small {
    padding: 0.6rem 1.2rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-small:hover {
    background: #0056b3;
}

.btn-small.danger {
    background: #dc3545;
}

.btn-small.danger:hover {
    background: #c82333;
}
/* Button inside card */
.result-card .btn-small {
    margin-top: 1rem;
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.95rem;
}

.result-card .btn-small:hover {
    background: #0056b3;
}

/* ============ FORMS (Shared) ============ */
.form-group {
    margin-bottom: 1.8rem;
    text-align: left;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea,
.auth-form select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.auth-form select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

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

.submit-button,
.apply-button,
.contact-button {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1.2rem;
    font-size: 1.3rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.submit-button:hover,
.apply-button:hover {
    background-color: #0056b3;
}

.contact-button {
    background-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.contact-button:hover {
    background-color: #218838;
}

.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #c3e6cb;
}

.error-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #f5c6cb;
}

/* ============ HOME PAGE ============ */
.stats {
    margin: 3rem 0;
    font-size: 1.1rem;
}

.stats p {
    margin: 0.8rem 0;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.search-form input[type="text"] {
    flex: 1 1 300px;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
}

.search-form select,
.search-form button {
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
}

.search-form button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    min-width: 120px;
}

.search-form button:hover {
    background-color: #0056b3;
}

/* ============ AUTH PAGES ============ */
.login-page { max-width: 500px; }
.register-page { max-width: 550px; }
.forgot-page { max-width: 500px; }
.reset-page {
    max-width: 500px;
    margin: 3rem auto;
    padding: 0 1rem;
}
.forgot-link {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #007bff;
    text-decoration: none;
}

.forgot-link:hover,
.auth-footer a:hover {
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: #666;
    font-size: 1rem;
}

.auth-footer a {
    color: #007bff;
    text-decoration: none;
}

/* ============ SEARCH RESULTS ============ */
.search-results-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.result-count {
    color: #666;
    font-size: 1.1rem;
}

.no-results-card {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    color: #666;
    font-size: 1.2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.8rem;
    margin-top: 2rem;
}

.result-card {
    background: white;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.result-card h3 {
    margin: 0 0 0.8rem;
    font-size: 1.4rem;
}

.result-card h3 a {
    color: #007bff;
    text-decoration: none;
}

.result-card h3 a:hover {
    text-decoration: underline;
}

.result-card .meta { color: #555; font-size: 1.05rem; margin-bottom: 0.8rem; }
.result-card .salary { color: #28a745; font-weight: bold; font-size: 1.1rem; margin: 0.8rem 0; }
.result-card .snippet { color: #444; line-height: 1.6; margin-bottom: 1rem; }
.result-card .date { color: #888; font-size: 0.95rem; }

/* ============ DETAIL PAGES (Job & Resume) ============ */
.job-detail-page,
.resume-detail-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.job-header,
.resume-header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.job-header h1,
.resume-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    color: #333;
}

.company-location,
.candidate-info {
    font-size: 1.3rem;
    color: #555;
    margin: 1rem 0;
}

.salary-highlight,
.experience-highlight {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
}

.salary-highlight { color: #28a745; }
.experience-highlight { color: #007bff; }

.posted-date,
.uploaded-date {
    color: #888;
    font-size: 1rem;
}

.job-content,
.resume-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.job-section,
.resume-section {
    margin-bottom: 2.5rem;
}

.job-section h2,
.resume-section h2 {
    font-size: 1.6rem;
    color: #007bff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eef2ff;
}

.description-text {
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
}

.skills-list {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
}

.resume-full {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.apply-section,
.contact-section {
    text-align: center;
    margin: 3rem 0;
}

.error-message {
    text-align: center;
    padding: 4rem 1rem;
    color: #666;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .logo { width: 160px; }

    .nav a {
        display: block;
        margin: 0.8rem 0;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input[type="text"],
    .search-form select,
    .search-form button {
        width: 100%;
        max-width: 400px;
    }

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

    .result-card { padding: 1.5rem; }

    .page-header h1,
    .form-container h1,
    .job-header h1,
    .resume-header h1 {
        font-size: 1.9rem;
    }

    .job-header,
    .resume-header,
    .job-content,
    .resume-content,
    .form-container {
        padding: 1.5rem;
    }

    .submit-button,
    .apply-button,
    .contact-button {
        font-size: 1.2rem;
        padding: 1rem 2rem;
    }
}