/* Modern Category Page Styles */
html {
    scroll-behavior: smooth;
}

.modern-category-page {
    --primary-color: #005f8d;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
}

/* Hero Section */
.modern-hero {
    background: linear-gradient(135deg, #005f8d 0%, #0088c2 100%);
    color: white;
    padding: 80px 20px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.modern-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.modern-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "heading image"
        "description image"
        "cta image";
    gap: 20px 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.modern-hero-heading {
    grid-area: heading;
}

.modern-hero-heading h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    color: white;
}

.modern-hero-description {
    grid-area: description;
}

.modern-hero-description .description {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
}

.modern-hero-cta {
    grid-area: cta;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.modern-hero-image {
    grid-area: image;
}

.modern-job-count {
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: white !important;
}

.modern-job-count svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* Buttons row */
.modern-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.modern-hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Breadcrumb */
.modern-breadcrumb {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

/* Align category breadcrumbs with job card/date column */
body.tax-job_category .modern-breadcrumb {
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 0 20px;
}

.modern-breadcrumb ol {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
}

.modern-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--border-color);
}

.modern-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.modern-breadcrumb a:hover {
    color: var(--primary-color);
}

/* Job Listings Container */
.modern-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

#job-listings {
    scroll-margin-top: 20px;
}

/* Note: Job card styling (titles, tags, etc.) is handled by plugin CSS */

/* Related Categories */
.related-categories {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.related-categories h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 32px;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 95, 141, 0.15);
    transform: translateY(-2px);
}

.category-card-link {
    display: block;
    padding: 24px;
    text-decoration: none;
    color: inherit;
}

.category-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.category-card .job-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.view-all-categories {
    text-align: center;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: #164863 !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.view-all-link:hover {
    background: #0d3347 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 72, 99, 0.3);
}

/* Pagination */
.job-board-pagination {
    margin-top: 60px;
    text-align: center;
}

.job-board-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.job-board-pagination .page-numbers:hover,
.job-board-pagination .page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* No Jobs Found */
.no-jobs-found {
    text-align: center;
    padding: 80px 20px;
}

.no-jobs-found p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

/* Modal Styles */
.email-alert-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.email-alert-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.email-alert-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-alert-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.email-alert-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.email-alert-modal-close svg {
    width: 24px;
    height: 24px;
    color: #666;
}

.email-alert-modal-header {
    padding: 40px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.email-alert-modal-header .modal-icon {
    width: 48px;
    height: 48px;
    color: #005f8d;
    margin: 0 auto 15px;
}

.email-alert-modal-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #005f8d;
    font-weight: 700;
}

.email-alert-modal-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
}

.email-alert-form {
    padding: 30px;
}

.email-alert-form .form-field {
    margin-bottom: 20px;
}

.email-alert-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.email-alert-form label.field-label {
    margin-bottom: 8px;
}

.email-alert-form .field-hint {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.email-alert-form input[type="email"],
.email-alert-form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.email-alert-form input[type="email"]:focus,
.email-alert-form input[type="text"]:focus {
    outline: none;
    border-color: #005f8d;
}

.category-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-height: 280px;
    overflow-y: auto;
    position: relative;
}

.category-checkboxes::-webkit-scrollbar {
    width: 8px;
}

.category-checkboxes::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 4px;
}

.category-checkboxes::-webkit-scrollbar-thumb {
    background: #005f8d;
    border-radius: 4px;
}

.category-checkboxes::-webkit-scrollbar-thumb:hover {
    background: #004a6d;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
    margin: 0 !important;
}

.checkbox-label:hover {
    background: rgba(0, 95, 141, 0.05);
}

.checkbox-label.current-category {
    background: rgba(0, 95, 141, 0.08);
    border: 1px solid rgba(0, 95, 141, 0.2);
    padding: 7px;
}

.checkbox-label.current-category span {
    font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #005f8d;
}

.checkbox-label span {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.gdpr-label {
    padding: 0 !important;
    background: transparent !important;
}

.gdpr-label span {
    font-weight: 400 !important;
    color: #666 !important;
    font-size: 13px !important;
    line-height: 1.5;
}

.submit-button {
    width: 100%;
    background: #005f8d;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.submit-button:hover {
    background: #004a6d;
}

.mc4wp-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

.mc4wp-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

.error-message {
    padding: 30px;
    text-align: center;
    color: #721c24;
}

.form-response {
    margin-top: 15px;
}

.form-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.button-loader {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Button Styles for Email Alert Button */
.modern-email-alert-btn {
    background: #ffffff;
    color: #005f8d;
    border: 1px solid #005f8d;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
    height: 48px;
}

.modern-email-alert-btn:hover {
    background: #005f8d;
    color: #ffffff;
    transform: translateY(-2px);
}

.modern-email-alert-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-hero {
        padding: 60px 20px;
    }

    .modern-hero-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "heading"
            "image"
            "description"
            "cta";
        gap: 25px;
        text-align: center;
    }

    .modern-hero-heading h1 {
        font-size: 2rem;
    }

    .modern-hero-description .description {
        font-size: 1rem;
    }

    .modern-hero-image img {
        max-width: 70%;
        margin: 0 auto;
        display: block;
    }

    /* Center job count and course button on mobile */
    .modern-hero-cta {
        align-items: center;
    }

    .modern-job-count {
        justify-content: center;
    }

    .modern-hero-buttons {
        justify-content: center;
    }

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

    .email-alert-modal {
        padding: 10px;
    }

    .email-alert-modal-content {
        max-height: 95vh;
    }

    .email-alert-modal-header {
        padding: 30px 20px 15px;
    }

    .email-alert-modal-header h2 {
        font-size: 20px;
    }

    .email-alert-form {
        padding: 20px;
    }

    .modern-email-alert-btn {
        font-size: 14px;
        padding: 10px 20px;
    }
}
