/**
 * Daily Jobs – Master frontend styles (liquid glass cards, meta, single tabs, related jobs)
 * Extracted 1:1 from previous theme job-styling.php for visual parity.
 * Theme-aware tokens: Astra global palette → WP presets → plugin fallbacks.
 * Version: 20260904
 */
:root {
    --djm-accent: var(--ast-global-color-0, var(--wp--preset--color--primary, var(--wp--preset--color--vivid-cyan-blue, #0F4CFF)));
    --djm-text: var(--ast-global-color-2, var(--ast-global-color-3, var(--wp--preset--color--foreground, #1a1a1a)));
    --djm-muted: var(--ast-global-color-3, var(--wp--preset--color--secondary, #555555));
    --djm-paper: var(--ast-global-color-5, var(--wp--preset--color--base, #ffffff));
    --djm-border: var(--ast-global-color-6, rgba(0, 0, 0, 0.08));
}

/* Scoped: only neutralize vertical margins on job listing contexts.
   Avoid global .site-content resets that break non-job Astra layouts. */
body.single-job_listing .site-content,
body.post-type-archive-job_listing .site-content,
body.tax-job_listing_category .site-content,
body.tax-job_listing_type .site-content,
body.djm-single-job .site-content {
    margin-top: 0;
    margin-bottom: 0;
}
/* ========================================
LIQUID BACKGROUND ANIMATION
======================================== */
.job-listings-background,
.top-job-section::before {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
}

.liquid-blob {
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    animation: liquidMove 18s infinite alternate ease-in-out;
}

.liquid-blob-1 {
    background: #dcfce7;
    top: -10%;
    left: -10%;
}

.liquid-blob-2 {
    background: #e0e7ff;
    bottom: -10%;
    right: -10%;
    animation-delay: -3s;
}

@keyframes liquidMove {
    from { transform: translate(0, 0); }
    to { transform: translate(80px, 50px); }
}

/* ========================================
UNIVERSAL JOB LISTING CARD STYLE - iOS 30 Liquid
Applies to: Homepage, Search, Archives, Categories
======================================== */

/* ========== ARTICLE/CARD CONTAINER - GLASSMORPHISM ========== */
article.job_listing,
.job_listings article.job_listing,
.site-main article.job_listing
 {
    
    border-radius: 16px !important;
    padding: 18px 20px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.4) !important;
    margin-bottom: 20px !important;
    position: relative !important;
    max-width: auto !important;
    transition: transform 0.3s ease !important;
}

div.job_listings article.job_listing {
    border-radius: 16px !important;
    padding: 18px 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    margin-bottom: 20px !important;
    position: relative !important;
    max-width: auto !important;
    transition: transform 0.3s ease !important;
}

.rp4wp-related-job_listing>ul, ul.job_listings {
    border-top: none !important;}
    
article.job_listing:hover {
    transform: translateY(-2px) !important;
}

/* ========== JOB LISTING HEADER - CENTERED LAYOUT ========== */
.job-listing-header,
article.job_listing .job-listing-header,
.job_listings article.job_listing .job-listing-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin-bottom: 4px !important;
    position: relative !important;
    width: 100% !important;
}

/* ========== COMPANY LOGO - ROUNDED WITH SHADOW ========== */
.company-logo,
figure.company-logo,
.job-listing-header .company-logo,
.job-listing-header figure.company-logo,
article.job_listing .company-logo,
article.job_listing figure.company-logo,
.job_listings .company-logo,
.job_listings figure.company-logo {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0 5px 0 !important;
    padding: 0 !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.02) !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.company-logo img,
figure.company-logo img,
.job-listing-header .company-logo img,
article.job_listing .company-logo img,
.job_listings .company-logo img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    object-fit: contain !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* ========== JOB TITLE WRAPPER - CENTERED ========== */
.job-title-wrap,
article.job_listing .job-title-wrap,
.job_listings article.job_listing .job-title-wrap {
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
}

.job-title-wrap .entry-title,
article.job_listing .job-title-wrap .entry-title {
    margin: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.02em !important;
}

.job-title-wrap .entry-title a {
    color: #1d1d1f !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

.job-title-wrap .entry-title a:hover {
    color: #1d1d1f !important;
}

.company-name,
article.job_listing .company-name {
    font-size: 11.5px !important;
    color: #6e6e73 !important;
    font-weight: 400 !important;
    margin-top: 1px !important;
}

.top-job-section .row div.job_listings article .company-name {
    padding-bottom: 14px !important;
}

/* ========== FEATURED LABEL - iOS STYLE ========== */
.featured-label {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ========== ENSURE META IS VISIBLE ========== */
article.job_listing .entry-meta,
.job_listings article.job_listing .entry-meta,
.single-job_listing .entry-meta,
.site-main article.job_listing .entry-meta {
    display: block !important;
}

/* ========== TOP JOB SECTION ========== */
section.top-job-section {
    background: #ffffff;
    padding: 24px 0 32px;
    position: relative;
}

/* ========================================
META GRID - iOS 30 STYLE WITH 2/3 COLUMN LAYOUT
======================================== */
.meta-grid,
article.job_listing .meta-grid,
.job_listings article.job_listing .meta-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .meta-grid,
    article.job_listing .meta-grid,
    .job_listings article.job_listing .meta-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

/* META ITEMS - GLASSMORPHISM */
.meta-item,
article.job_listing .meta-item,
.job_listings article.job_listing .meta-item {
    background: rgba(255, 255, 255, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 14px !important;
    padding: 4px 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-height: 30px !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.meta-item:hover {
    transform: translateY(-1px) !important;
    background: rgba(255, 255, 255, 0.5) !important;
}

/* META ICONS - THEMED BACKGROUNDS */
.meta-item i,
.meta-item svg,
.meta-item .currency svg,
article.job_listing .meta-item i,
article.job_listing .meta-item svg,
.single-job_listing .meta-grid .meta-item i,
.single-job_listing .meta-grid .meta-item svg,
.single-job-meta .meta-grid .meta-item i,
.single-job-meta .meta-grid .meta-item svg {
    width: 12px !important;
    height: 12px !important;
    min-width: 12px !important;
    min-height: 12px !important;
    padding: 7px !important;
    font-size: 12px !important;
    border-radius: 50px !important;
    stroke-width: 2px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: content-box !important;
}

/* ICON COLOR THEMES - All Meta Types */
.meta-item.meta-grade svg,
.meta-item.meta-grade i { color: #007aff !important; background: #e0f2fe !important; }

.meta-item.meta-cgpa svg,
.meta-item.meta-cgpa i,
.meta-item.min-cgpa svg,
.meta-item.min-cgpa i { color: #f59e0b !important; background: #fffbeb !important; }

.meta-item.meta-education svg,
.meta-item.meta-education i,
.meta-item.degree-required svg,
.meta-item.degree-required i { color: #6366f1 !important; background: #eef2ff !important; }

.meta-item.meta-position svg,
.meta-item.meta-position i,
.meta-item.number-of-posts svg,
.meta-item.number-of-posts i { color: #8b5cf6 !important; background: #f5f3ff !important; }

.meta-item.meta-location svg,
.meta-item.meta-location i,
.meta-item.company-address svg,
.meta-item.company-address i {color: #10b981 !important; background: #ecfdf5 !important; }

.meta-item.meta-deadline svg,
.meta-item.meta-deadline i,
.meta-item.application-deadline svg,
.meta-item.application-deadline i { color: #ef4444 !important; background: #fef2f2 !important; }

.meta-item.meta-salary svg,
.meta-item.meta-salary i,
.meta-item.salary svg,
.meta-item.salary i,
.meta-item.salary-amt svg,
.meta-item.salary-amt i,
.meta-item.salary .currency svg { color: #da1137 !important; background: #da11370f !important; }

.meta-item.meta-experience svg,
.meta-item.meta-experience i,
.meta-item.experience-required svg,
.meta-item.experience-required i { color: #0891b2 !important; background: #cffafe !important; }

.meta-item.meta-type svg,
.meta-item.meta-type i,
.meta-item.job-type svg,
.meta-item.job-type i { color: #7c3aed !important; background: #ede9fe !important; }

.meta-item.posted-time svg,
.meta-item.posted-time i { color: #ec4899 !important; background: #fce7f3 !important; }

/* Ensure currency wrapper doesn't interfere */
.meta-item .currency {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

/* META ITEM & TEXT - INTERACTIVE EXPAND/COLLAPSE */
.meta-item {
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.meta-item span {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #27272a !important;
    white-space: nowrap !important; /* Truncated by default */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    max-width: 100% !important;
}

/* THE "EXPANDED" STATE (Triggered by Click) */
.meta-item.expanded {
    background: rgba(255, 255, 255, 0.95) !important;
    z-index: 100 !important;
}

.meta-item.expanded span {
    white-space: normal !important; /* Shows full text */
    overflow: visible !important;
    text-overflow: clip !important;
}

/* ========================================
ACTION BUTTONS - iOS STYLE - ENLARGED DETAILS BUTTON
======================================== */
.job-actions,
article.job_listing .job-actions,
.job_listings article.job_listing .job-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 6px !important;
}

/* SAVE BUTTON - Smaller to give more space to Details */
.save-btn,
.save-job-btn,
article.job_listing .save-btn,
article.job_listing .save-job-btn {
    flex: 0.8 !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 15px !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
}

.save-btn span,
.save-job-btn span {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #3f3f46 !important;
}

.save-btn svg,
.save-btn i,
.save-job-btn svg,
.save-job-btn i {
    width: 14px !important;
    height: 14px !important;
    color: #8e8e93 !important;
    transition: 0.2s !important;
}

.save-btn.active svg,
.save-btn.active i,
.save-job-btn.saved svg,
.save-job-btn.saved i {
    color: #ef4444 !important;
    fill: #ef4444 !important;
}

.save-btn.active span,
.save-job-btn.saved span {
    decoration: bold;
    color: #ef4444 !important;
}

/* APPLY BUTTON / DETAILS BUTTON - ENLARGED TO EXTEND RIGHT */
.apply-btn,
.details-btn,
article.job_listing .apply-btn,
article.job_listing .details-btn,
.job_listings article.job_listing .details-btn {
    flex: 4 !important;
    background: linear-gradient(135deg, #0F4CFF 0%, #2563EB 100%)!important;
    box-shadow: 0 10px 25px rgba(5, 26, 155, 0.18) !important;
    color: #fff !important;
    border-radius: 15px !important;
    padding: 10px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    transition: transform 0.2s ease !important;
    cursor: pointer !important;
}

.apply-btn:hover,
.details-btn:hover {
    transform: scale(0.98) !important;
}

.apply-btn:active,
.details-btn:active {
    transform: scale(0.97) !important;
}

/* ========================================
SINGLE JOB PAGE SPECIFIC STYLES
======================================== */

/* 🔧 FIX: Prevent tab-flash (FOUC). Hide raw h4/content until JS
   finishes building the tab structure, then fade it in smoothly. */
.single_job_listing .job_description {
    opacity: 0 !important;
    min-height: 200px !important;
    transition: opacity 0.25s ease !important;
}

.single_job_listing .job_description.tabs-ready {
    opacity: 1 !important;
}

/* ========================================
   Job Tabs Styling — Card + Internal Scroll
   ======================================== */

/* Outer card: the whole tabbed section is its own glass card. The nav
   sits fixed at the top of the card; only the content area below it
   scrolls internally. The page itself never scrolls because of this
   component — no viewport-sticky positioning is used anymore. */
.job-tabs-container {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden; /* safe here: nav and content scroll independently, nothing inside needs to be sticky to the viewport */
}

.job-tabs-nav-wrapper {
    /* Sits naturally at the top of the card - no viewport sticky/offset
       math needed since the card itself doesn't scroll with the page. */
    position: relative;
    flex-shrink: 0;
    z-index: 1;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Scroll Indicators (Fading effect) */
.job-tabs-nav-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, rgba(248, 250, 252, 0), rgba(248, 250, 252, 0.95));
    pointer-events: none;
    z-index: 2;
}

.job-tabs-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 44px 8px 8px; /* Add space for the gradient + breathing room */
    list-style: none;
    scrollbar-width: none;
}

.job-tabs-nav::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.job-tab-btn {
    padding: 2px 18px;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    border-radius: 12px;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    white-space: nowrap; /* Prevent text wrapping inside buttons */
    flex-shrink: 0; /* Prevent tabs from shrinking */
}

.job-tab-btn i {
    font-size: 13px;
    opacity: 0.85;
}

.job-tab-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    transform: translateY(-1px);
}

.job-tab-btn.active {
    background: #2563eb;
    color: #fff !important;
}

.job-tab-btn.active i {
    opacity: 1;
}

.job-tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.job-tab-pane.active {
    display: block;
}

/* Content area: fixed max-height, scrolls internally so the page around
   the card never has to move when switching or reading through tabs. */
.job-tabs-content {
    max-height: 65vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    scroll-behavior: smooth;
}

/* Fade hint at the bottom of the scrollable content, signalling there's
   more to read below. */
.job-tabs-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    display: block;
    height: 36px;
    margin-top: -36px;
    pointer-events: none;
}

/* Give headings and paragraphs inside each tab pane some breathing room
   and a clear visual hierarchy, since they're just raw h4/p/table content
   dropped in from the editor */
.job-tab-pane h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eef2f7;
}

.job-tab-pane h4:not(:first-child) {
    margin-top: 28px;
}

.job-tab-pane p,
.job-tab-pane li {
    color: #374151;
}

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

/* Mobile Responsive Tabs */
@media (max-width: 768px) {
    .job-tabs-container {
        margin-top: 15px !important;
        padding: 4px;
        border-radius: 18px;
    }

    .job-tabs-content {
        max-height: 60vh;
        padding: 18px 6px;
    }

    .job-tab-btn {
        padding: 10px 14px;
        font-size: 13.5px;
    }
}

/* ========================================
   DESKTOP: No tabs — show all content normally
   ======================================== */
@media (min-width: 769px) {
    /* Hide the tab nav entirely */
    .job-tabs-nav-wrapper {
        display: none !important;
    }

    /* Remove card-like container styling */
    .job-tabs-container {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    /* Remove scroll limit on content area */
    .job-tabs-content {
        max-height: none !important;
        overflow-y: visible !important;
        padding: 0 !important;
    }

    /* Show ALL panes stacked, not just active */
    .job-tab-pane {
        display: block !important;
        animation: none !important;
    }
}

/* Expired deadline styling */
.meta-item.application-deadline.expired {
    opacity: 0.7 !important;
    position: relative !important;
}

.meta-item.application-deadline.expired .expired-label {
    color: #000 !important;
    font-style: italic !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
}

.meta-item.application-deadline.expired::before {
    content: '⚠️ ' !important;
    margin-right: 5px !important;
}

.single-job_listing .meta-grid .meta-item,
.job_listing .meta-grid .meta-item {
    display: inline-flex !important;
    align-items: center !important;
}

/* Content text formatting */
.single-job_listing .site-main article .entry-content,
.single-job_listing .site-main article .entry-content p,
.single-job_listing .site-main article .entry-content div,
.single-job_listing .site-main article .entry-content li {
    text-align: none !important;
    font-size: 16px !important;
    line-height: 2.1 !important;
}

/* Mobile and small devices - 14px font */
@media screen and (max-width: 768px) {
    .single-job_listing .site-main article .entry-content,
    .single-job_listing .site-main article .entry-content p,
    .single-job_listing .site-main article .entry-content div,
    .single-job_listing .site-main article .entry-content li {
        font-size: 12px !important;
        line-height:1.7 !important;
    }
}

.single-job_listing .site-main article .entry-content,
.single-job_listing .site-main article .entry-content h1 {
    font-size: 1.7em !important;
}

/* ========================================
TABLE STYLING - CLEAN BLACK THEME
2 Columns on all devices with responsive sizing
======================================== */
.single-job_listing .site-main article .entry-content table,
.single-job_listing .entry-content table,
.entry-content table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;

    border-radius: 16px !important;
    overflow: hidden !important;
}

.single-job_listing .site-main article .entry-content table thead,
.single-job_listing .entry-content table thead,
.entry-content table thead {
    background: rgba(33, 89, 229) !important;
    color:white;
}

.single-job_listing .site-main article .entry-content table thead th,
.single-job_listing .entry-content table thead th,
.entry-content table thead th {
    color: #fff !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 15px 12px !important;
    font-size: 14px !important;
    border: none !important;
}

.single-job_listing .site-main article .entry-content table tbody tr,
.single-job_listing .entry-content table tbody tr,
.entry-content table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: background-color 0.2s ease !important;
}

.single-job_listing .site-main article .entry-content table tbody tr:hover,
.single-job_listing .entry-content table tbody tr:hover,
.entry-content table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

.single-job_listing .site-main article .entry-content table tbody tr:last-child,
.single-job_listing .entry-content table tbody tr:last-child,
.entry-content table tbody tr:last-child {
    border-bottom: none !important;
}

.single-job_listing .site-main article .entry-content table tbody td,
.single-job_listing .entry-content table tbody td,
.entry-content table tbody td {
    padding: 12px !important;
    font-size: 14px !important;
    color: #333 !important;
    text-align: left !important;
    vertical-align: middle !important;
    border: none !important;
}

.single-job_listing .site-main article .entry-content table tbody tr:nth-child(even),
.single-job_listing .entry-content table tbody tr:nth-child(even),
.entry-content table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Tablet devices (469px-768px) */
@media screen and (min-width: 469px) and (max-width: 768px) {
    .single-job_listing .site-main article .entry-content table thead th,
    .single-job_listing .entry-content table thead th,
    .entry-content table thead th {
        font-size: 12px !important;
        padding: 12px 10px !important;
    }

    .single-job_listing .site-main article .entry-content table tbody td,
    .single-job_listing .entry-content table tbody td,
    .entry-content table tbody td {
        font-size: 12px !important;
        padding: 10px !important;
    }
}

/* Mobile devices (≤468px) */
@media screen and (max-width: 468px) {
    .single-job_listing .site-main article .entry-content table,
    .single-job_listing .entry-content table,
    .entry-content table {
        font-size: 11px !important;
    }

    .single-job_listing .site-main article .entry-content table thead th,
    .single-job_listing .entry-content table thead th,
    .entry-content table thead th {
        font-size: 10px !important;
        padding: 10px 8px !important;
    }

    .single-job_listing .site-main article .entry-content table tbody td,
    .single-job_listing .entry-content table tbody td,
    .entry-content table tbody td {
        font-size: 10px !important;
        padding: 8px 6px !important;
    }
}

/* ========================================
RESPONSIVE DESIGN - iOS 30 STYLE
======================================== */

/* Large Desktop (1440px+) */
@media screen and (min-width: 1440px) {
    article.job_listing {
        max-width: 360px !important;
        padding: 20px 22px !important;
    }

    .company-logo {
        width: 52px !important;
        height: 52px !important;
    }

    .job-title-wrap .entry-title {
        font-size: 18px !important;
    }

    .meta-item {
        font-size: 11px !important;
        padding: 7px 11px !important;
    }
}

/* Tablet (768px-1024px) */
@media screen and (max-width: 1024px) {
    article.job_listing {
        max-width: 320px !important;
        padding: 16px 18px !important;
    }

    .meta-row {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Mobile (≤768px) */
@media screen and (max-width: 768px) {
    article.job_listing {
        max-width: 100% !important;
        margin: 0 auto 16px !important;
        padding: 16px 18px !important;
        border-radius: 28px !important;
    }
    .single-job_listing .site-main article .entry-header {
        align-items: center !important;
    }
    
    .liquid-blob {
        width: 350px !important;
        height: 350px !important;
    }

    .company-logo {
        width: 44px !important;
        height: 44px !important;
    }

    .job-title-wrap .entry-title {
        font-size: 16px !important;
    }

    .company-name {
        font-size: 11px !important;
    }

    .meta-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .meta-item {
        font-size: 9.5px !important;
        padding: 5px 9px !important;
        min-height: 34px !important;
    }

    .meta-item i,
    .meta-item svg {
        width: 16px !important;
        height: 16px !important;
        padding: 4px !important;
    }
}

/* Small Mobile (≤480px) */
@media screen and (max-width: 480px) {
    article.job_listing {
        padding: 14px 16px !important;
        border-radius: 24px !important;
    }

    .company-logo {
        width: 42px !important;
        height: 42px !important;
    }

    .job-title-wrap .entry-title {
        font-size: 15px !important;
    }

    .meta-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 5px !important;
    }

    .meta-item {
        font-size: 9px !important;
        padding: 5px 8px !important;
        gap: 5px !important;
        border-radius: 14px !important;
    }

    .apply-btn,
    .details-btn {
        font-size: 13px !important;
        padding: 9px !important;
    }

    .save-btn span,
    .save-job-btn span {
        font-size: 11px !important;
    }
}

/* Mobile Padding Fix for Main Content */
@media screen and (max-width: 768px) {
    .single-job_listing .site-main article,
    .single-job_listing .site-content article {
        padding: 25px 5px !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
    }

}

/* ===== RELATED JOBS: iOS LIQUID STYLE - COMPACT 2-COL ===== */
.related-jobs-wrapper {
    margin-top: 60px !important;
    padding-top: 50px !important;
    border-top: 3px solid rgba(0, 0, 0, 0.05) !important;
    clear: both !important;
}

.related-jobs-heading {
    font-size: 28px !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 35px !important;
    color: #1a1a1a !important;
}

.related-jobs-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px !important;
    
    margin: 0 7px 40px !important;
}

.related-job-item {
    position: relative !important;
    isolation: isolate !important;
    background: transparent !important;
    border-radius: 24px !important;
    padding: 16px 20px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    transition: transform 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    
}

.related-job-item::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: -1 !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 24px !important;
}

.related-job-item:hover {
    transform: translateY(-3px) !important;
}

/* TIGHTEN HEADER SPACING */
.card-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 8px !important;
    padding-left: 10px;

}

.related-job-item .company-logo {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.related-job-item .company-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 4px !important;
}

.logo-placeholder {
    color: #ccc !important;
    font-size: 20px !important;
}

.card-info {
    flex: 1 !important;
    min-width: 0 !important;
    padding-top: 0 !important;
    line-height: 1.3 !important;
}

.related-job-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 4px !important;
    word-break: break-word !important;
}

.related-job-title a {
    color: #111 !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.related-job-title a:hover {
    color: #000 !important;
}

.company-name-inline {
    font-size: 0.75em !important;
    color: #666 !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    flex-basis: 100% !important;
    width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* META GRID - TIGHT TO COMPANY NAME */
.meta-grid-compact {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 0 !important;
    padding-top: 4px !important;
}

.meta-grid-compact .meta-item {
    background: rgba(255, 255, 255, 0.5) !important;
    padding: 7px 9px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-size: 11.5px !important;
    color: #444 !important;
    min-height: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.meta-grid-compact .meta-item i,
.meta-grid-compact .meta-item svg {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 3px !important;
    font-size: 11px !important;
}

.meta-grid-compact .meta-item span {
    font-size: 10px !important;
    line-height: 1.2 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .related-jobs-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .related-job-title {
        font-size: 14px !important;
    }
    
    .card-header {
        gap: 10px !important;
        margin-bottom: 6px !important;
    }
    
    .related-job-item {
        border-radius: 20px !important;
    }
}

@media (max-width: 480px) {
    .related-job-title {
        font-size: 12px !important;
        align-items: flex-start !important;
        gap: 1px !important;
    }
    
    .company-name-inline {
        white-space: normal !important;
    }
    
    .card-header {
        gap: 8px !important;
    }
    
    .related-job-item .company-logo {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
    }
    
    .meta-grid-compact .meta-item {
        font-size: 11px !important;
        padding: 6px 8px !important;
    }
}
/* 🔧 FIX: Force full width + 2:4 ratio */
.job-actions,
article.job_listing .job-actions,
.job_listings article.job_listing .job-actions {
    display: flex !important;
    grid-column: 1 / -1 !important; /* Forces container to span all grid columns */
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
    margin-top: 16px !important;
    box-sizing: border-box !important;
}

/* SAVE BUTTON: 2 parts */
.save-btn,
.save-job-btn,
article.job_listing .save-btn,
article.job_listing .save-job-btn {
    flex: 2 !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 15px !important;
    padding: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
}
.save-btn span, .save-job-btn span { font-size: 12px !important; font-weight: 600 !important; color: #3f3f46 !important; }
.save-btn svg, .save-btn i, .save-job-btn svg, .save-job-btn i { width: 14px !important; height: 14px !important; color: #8e8e93 !important; }

/* DETAILS BUTTON: 4 parts (takes 2x the space of Save) */
.apply-btn,
.details-btn,
article.job_listing .apply-btn,
article.job_listing .details-btn,
.job_listings article.job_listing .details-btn {
    flex: 4 !important;
    min-width: 0 !important; /* Prevents text overflow on small screens */
    background: linear-gradient(135deg, #0F4CFF 0%, #2563EB 100%)!important;
    box-shadow: 0 10px 25px rgba(5, 26, 155, 0.18) !important;
    color: #fff !important;
    border-radius: 15px !important;
    padding: 10px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    transition: transform 0.2s ease !important;
    cursor: pointer !important;
}
.apply-btn:hover, .details-btn:hover { transform: scale(0.98) !important; }
.apply-btn:active, .details-btn:active { transform: scale(0.97) !important; }
.single-job .site-content > .entry-header {
  min-height: 360px;
  position: relative;
  z-index: 1;
  display: none;
}

/* ========================================
FIX: Large Desktop Width (1280px+)
======================================== */
@media screen and (min-width: 1280px) {
    /* Increase container width for single job pages */
    .single-job_listing .site-content .entry-header,
    .single-job_listing .site-content article,
    .single-job_listing .site-main article {
        max-width: 900px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Adjust meta grid for better spacing */
    .single-job-meta .meta-grid {
        max-width: 900px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Ensure content area uses full available width */
    .single-job_listing .site-content {
        max-width: 100% !important;
    }
    
    /* Adjust job listing cards in archives */
    article.job_listing {
        max-width: 100% !important;
    }
}

/* Extra Large Desktop (1440px+) */
@media screen and (min-width: 1440px) {
    .single-job_listing .site-content .entry-header,
    .single-job_listing .site-content article,
    .single-job-meta .meta-grid {
        max-width: 1000px !important;
    }
}

/* Plugin must NOT force global .site-content padding.
   Spacing for job UI lives on plugin-owned containers only. */
/* ========================================
FIX: Related Jobs Width on Large Desktop
======================================== */
@media screen and (min-width: 1280px) {
    /* Force the grid to match the main content width (900px) */
    .related-jobs-grid {
        max-width: 900px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
    }
    
    /* Ensure the cards inside fill the space */
    .related-job-item {
        width: 100% !important;
        max-width: none !important; 
    }
}

/* Extra Large Screens (1440px+) */
@media screen and (min-width: 1440px) {
    .related-jobs-grid {
        max-width: 1000px !important;
    }
}
/* ========================================
UNIFORM CARD SIZING - ALL DEVICES
======================================== */

/* Force uniform card width and structure */
article.job_listing,
.job_listings article.job_listing,
.site-main article.job_listing,
div.job_listings article.job_listing {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure header takes full width */
.job-listing-header,
article.job_listing .job-listing-header,
.job_listings article.job_listing .job-listing-header {
    width: 100% !important;
    min-width: 100% !important;
}

/* Force company logo to fixed size */
.company-logo,
figure.company-logo,
article.job_listing .company-logo {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    flex-shrink: 0 !important;
}

/* Job title wrapper - full width */
.job-title-wrap,
article.job_listing .job-title-wrap {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
}

/* Entry title - prevent overflow, maintain structure */
.job-title-wrap .entry-title,
article.job_listing .job-title-wrap .entry-title {
    min-height: unset !important; /* Allows height to adjust to content */
    margin-bottom: 4px !important; /* Adds a tiny breathing room below text */
    width: 100% !important;
}

/* Company name - fixed minimum height */
.company-name,
article.job_listing .company-name {
    min-height: 20px !important;
    width: 100% !important;
}

/* Meta grid - full width */
.entry-meta,
article.job_listing .entry-meta,
.job_listings article.job_listing .entry-meta {
    width: 100% !important;
    min-width: 100% !important;
}

.meta-grid,
article.job_listing .meta-grid,
.job_listings article.job_listing .meta-grid {
    width: 100% !important;
    min-width: 100% !important;
    grid-template-columns: repeat(2, 1fr) !important;
}

/* Job actions - full width */
.job-actions,
article.job_listing .job-actions,
.job_listings article.job_listing .job-actions {
    width: 100% !important;
    min-width: 100% !important;
    grid-column: 1 / -1 !important;
}

/* ========================================
MOBILE SPECIFIC - UNIFORM CARDS
======================================== */
@media screen and (max-width: 768px) {
    article.job_listing,
    .job_listings article.job_listing,
    .site-main article.job_listing {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Ensure consistent padding */
    article.job_listing {
        padding: 16px 18px !important;
    }
    
    /* Fixed logo size */
    .company-logo,
    figure.company-logo {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    /* Title area - minimum height for consistency */
    .job-title-wrap .entry-title {
        min-height: 42px !important; /* Accommodates 2 lines */
        font-size: 16px !important;
        line-height: 1.3 !important;
    }
    
    /* Company name - fixed height area */
    .company-name {
        min-height: 18px !important;
        font-size: 11px !important;
    }
    
    /* Meta items - uniform sizing */
    .meta-item {
        min-height: 34px !important;
        width: 100% !important;
    }
    
    /* Buttons - full width */
    .job-actions {
        width: 100% !important;
        margin-top: 16px !important;
    }
    
    .details-btn,
    .apply-btn {
        flex: 4 !important;
        width: auto !important;
    }
    
    .save-btn,
    .save-job-btn {
        flex: 2 !important;
        width: auto !important;
    }
}

/* Small mobile - extra consistency */
@media screen and (max-width: 480px) {
    article.job_listing {
        padding: 14px 16px !important;
        width: 100% !important;
        min-width: 100% !important;
    }
    
    .company-logo {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
    }
    
    .job-title-wrap .entry-title {
        min-height: 40px !important;
        font-size: 15px !important;
    }
    
    .company-name {
        min-height: 16px !important;
    }
    
    .meta-item {
        min-height: 32px !important;
        font-size: 9px !important;
    }
}



/* Desktop: Multiple columns but uniform cards */
@media screen and (min-width: 769px) {
    .job_listings,
    .site-main .job_listings {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
        margin-top: 50px;
    }
    
    article.job_listing {
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* Mobile: Single column, full width */
@media screen and (max-width: 768px) {
    .job_listings,
    .site-main .job_listings {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-top: 50px;
    }
}

/* Make cards in the same row match height */
.job_listings,
.site-main .job_listings,
div.job_listings {
    align-items: stretch !important;
}

article.job_listing,
.job_listings article.job_listing {
    align-self: stretch !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important; /* Allows .job-actions { margin-top: auto } to push buttons down */
}

/* Fix grid alignment to prevent row height matching */
.meta-grid {
    align-items: start !important;
}

/* Ensure consistent spacing after title area */
.job-title-wrap {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.company-name {
    margin-bottom: 8px !important;
    min-height: auto !important;
}

/* Fix: Remove any inherited min-height from parent containers */
.job-listing-header {
    min-height: auto !important;
    height: auto !important;
}

/* Ensure buttons area doesn't push content down */
.job-actions {
    margin-top: auto !important; /* Pushes buttons to bottom */
    padding-top: 12px !important;
}

/* MOBILE SPECIFIC FIX */
@media screen and (max-width: 768px) {
    .job_listings {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    article.job_listing {
        width: 100% !important;
        margin-bottom: 0 !important;
    }
}

/* ============================================
   SINGLE JOB PAGE — META GRID REDESIGN (NEW)
   Scoped ONLY to the single job listing page.
   Does not affect homepage/archive/search cards
   or the related-jobs meta-grid-compact styles.
   ============================================ */

.single-job_listing .job_listings article.job_listing .meta-grid,
.single-job_listing article.job_listing .meta-grid,
.single-job_listing .meta-grid,
.single-job-meta .meta-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important; /* Desktop: 3 columns */
    gap: 14px !important;
    padding: 12px !important;
    background: transparent !important;
    border-radius: 20px !important;
    margin-bottom: 24px !important;
}

/* ===== CARD ===== */
.single-job_listing .meta-grid .meta-item,
.single-job-meta .meta-grid .meta-item {
    background: rgba(255,255,255,0.4) !important;
    border: 1px solid rgba(255,255,255,0.8) !important;
    border-radius: 14px !important;
    padding: 14px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-height: 46px !important;

}

.single-job_listing .meta-grid .meta-item:hover,
.single-job-meta .meta-grid .meta-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08) !important;
    border-color: #d6e0ff !important;
}

/* ===== ICON WRAPPER — now unified in the main .meta-item i/svg rule above ===== */

/* ===== TEXT ===== */
/* Truncated by default (shows "...") — click the card to expand */
.single-job_listing .meta-grid .meta-item span,
.single-job-meta .meta-grid .meta-item span {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    max-width: 100% !important;
}

/* Expanded state: show full text */
.single-job_listing .meta-grid .meta-item.expanded span,
.single-job-meta .meta-grid .meta-item.expanded span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.single-job_listing .meta-grid .meta-item.expanded,
.single-job-meta .meta-grid .meta-item.expanded {
    background: #ffffff !important;
    z-index: 5 !important;
}

/* If the markup splits label/value into separate elements
   (e.g. .meta-label / .meta-value), this refines the hierarchy.
   Harmless no-op if those classes aren't present in the markup. */
.single-job_listing .meta-grid .meta-item .meta-label,
.single-job-meta .meta-grid .meta-item .meta-label {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    margin-bottom: 2px !important;
    display: block !important;
}

.single-job_listing .meta-grid .meta-item .meta-value,
.single-job-meta .meta-grid .meta-item .meta-value {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: block !important;
}

/* ===== RESPONSIVE ===== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .single-job_listing .job_listings article.job_listing .meta-grid,
    .single-job_listing article.job_listing .meta-grid,
    .single-job_listing .meta-grid,
    .single-job-meta .meta-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (max-width: 768px) {
    .single-job_listing .job_listings article.job_listing .meta-grid,
    .single-job_listing article.job_listing .meta-grid,
    .single-job_listing .meta-grid,
    .single-job-meta .meta-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 16px !important;
        gap: 10px !important;
    }

    .single-job_listing .meta-grid .meta-item,
    .single-job-meta .meta-grid .meta-item {
        padding: 2px 4px !important;
    }
}


/* ============================================================
   SINGLE JOB – TOP SECTION (Position @ Company) — 100% parity
   ============================================================ */
.single-job_listing .site-main .single_job_listing .company,
.single-job .site-main .single_job_listing .company {
    display: none !important;
}

.single-job_listing header.entry-header.custom-job-header,
.single-job_listing header.entry-header.djm-job-header,
.single-job header.entry-header.custom-job-header,
.djm-job-header {
    display: block !important;
    width: 100% !important;
    margin: 0 0 18px !important;
    padding: 18px 20px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.75) !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08) !important;
}

.single-job_listing header.entry-header.custom-job-header .entry-title,
.single-job_listing header.entry-header.djm-job-header .entry-title,
.djm-job-header .entry-title {
    margin: 0 !important;
    font-size: 1.55rem !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 6px 8px !important;
}

.single-job_listing .custom-job-header .company-name,
.djm-job-header .company-name {
    font-weight: 500 !important;
    font-size: 0.92em !important;
    color: #475569 !important;
}

/* Apply button */
.single_job_listing .application .application_button,
.single-job_listing .application .application_button,
.job_application .application_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #ff3852 0%, #e11d48 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 22px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.28) !important;
    transition: transform .15s ease, box-shadow .15s ease !important;
}
.single_job_listing .application .application_button:hover,
.job_application .application_button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 24px rgba(225, 29, 72, 0.35) !important;
    color: #fff !important;
}

/* Favorite button on single */
.single-job_listing .job-favorite-btn,
.single_job_listing .job-favorite-btn {
    margin-left: 10px !important;
}

/* Meta grid on single */
.single-job_listing .job-listing-meta.meta-grid,
.single_job_listing .meta.meta-grid {
    margin-top: 12px !important;
    margin-bottom: 16px !important;
}

@media screen and (max-width: 768px) {
    .single-job_listing header.entry-header.custom-job-header,
    .djm-job-header {
        padding: 14px 16px !important;
        border-radius: 16px !important;
    }
    .single-job_listing header.entry-header.custom-job-header .entry-title,
    .djm-job-header .entry-title {
        font-size: 1.2rem !important;
    }
}

/* ============================================================
   PRODUCTION PARITY — thedailyjobs.com single job header
   ============================================================ */

/* Hide theme default post title / byline on single jobs */
.single-job_listing .entry-header:not(.custom-job-header):not(.djm-job-header),
.single-job_listing .ast-single-post .entry-header,
.single-job_listing .page-header,
body.single-job_listing .entry-meta.ast-minimal-meta,
body.single-job_listing .ast-author-meta,
body.single-job_listing .posted-on,
body.single-job_listing .byline {
    display: none !important;
}

/* Centered glass title card — matches production */
.single-job_listing header.entry-header.custom-job-header,
.single-job_listing header.entry-header.djm-job-header,
.djm-job-header {
    text-align: center !important;
    margin: 8px auto 28px !important;
    padding: 28px 24px 24px !important;
    max-width: 920px !important;
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

.single-job_listing header.entry-header.custom-job-header .entry-title,
.djm-job-header .entry-title {
    display: block !important;
    text-align: center !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

.single-job_listing .custom-job-header .company-name,
.djm-job-header .company-name {
    display: block !important;
    margin-top: 8px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

/* Application ends line */
.djm-application-ends {
    text-align: center !important;
    margin: 8px 0 18px !important;
    font-size: 15px !important;
    color: #334155 !important;
}
.djm-application-ends .djm-ends-date {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

/* Apply button — production blue */
.single_job_listing .application .application_button,
.single-job_listing .application .application_button,
.job_application .application_button {
    background: #2563eb !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28) !important;
}
.single_job_listing .application .application_button:hover,
.job_application .application_button:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
}

/* Favorite + apply row centered */
.single-job_listing .application,
.single_job_listing .application {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin: 12px 0 28px !important;
}

.single-job_listing .job-favorite-btn,
.single_job_listing .job-favorite-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
}
.single-job_listing .job-favorite-btn svg {
    width: 20px !important;
    height: 20px !important;
}
.single-job_listing .job-favorite-btn .job-favorite-text {
    display: none !important;
}
.single-job_listing .job-favorite-btn.is-favorite svg,
.single-job_listing .job-favorite-btn.is-favorite path {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
    color: #ef4444 !important;
}

@media (max-width: 768px) {
    .single-job_listing header.entry-header.custom-job-header .entry-title,
    .djm-job-header .entry-title {
        font-size: 1.35rem !important;
    }
}

/* === Single job actions (from original meta template) === */

        .meta-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 15px;
            margin-bottom: 20px;
            border: 1px solid #fff;
            border-radius: 8px;
        }
        @media (min-width: 768px) {
            .meta-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }
        .meta-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 15px;
            border: 1px solid #fff;
            border-radius: 6px;
            background-color: #ffffff;
            height: 100%;
            box-sizing: border-box;
        }
        .meta-item i {
            font-size: 16px;
            color: #666;
            width: 20px;
            text-align: center;
        }
        .meta-item span {
            font-size: 14px;
            color: #444;
            word-break: break-word;
        }

        /* New Action Buttons Styles */
        .job-actions-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }
        .deadline-text {
            font-size: 16px;
            color: #333;
            font-weight: 500;
        }
        .deadline-text span {
            color: #d9534f;
            font-weight: 700;
        }
        .action-buttons {
            display: flex;
            align-items: stretch; /* Ensure same height */
            gap: 15px;
            width: 100%;
            justify-content: center;
        }
        .apply-now-btn {
            background-color: #0F4CFF; /* Palette primary blue */
            color: #fff !important;
            padding: 0 35px; /* Padding for horizontal, height controlled by container */
            height: 50px; /* Explicit height to match favorite button */
            border-radius: 8px;
            font-weight: 600;
            text-decoration: none !important; /* Ensure no underline */
            font-size: 16px;
            transition: background-color 0.3s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 160px;
            border: none;
            cursor: pointer;
            box-sizing: border-box;
        }
        .apply-now-btn:hover {
            background-color: #2159E5; /* Slightly lighter blue for hover */
            text-decoration: none !important;
        }
        
        /* Favorite Button Override for Grid */
        .meta-grid-favorite .job-favorite-btn {
            position: static !important;
            width: 50px !important;
            height: 50px !important;
            border-radius: 8px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 0 !important;
            margin: 0 !important;
            box-shadow: none !important;
            box-sizing: border-box !important;
        }
        .single-job_listing .meta-grid-favorite .job-favorite-btn {
            display: flex !important;
        }
        .meta-grid-favorite .job-favorite-btn svg {
            width: 20px !important;
            height: 20px !important;
            stroke: #ef4444 !important; /* Palette primary blue */
        }
        .meta-grid-favorite .job-favorite-btn.is-favorite svg {
            fill: #ef4444 !important;
        }
        .meta-grid-favorite .job-favorite-text,
        .meta-grid-favorite .job-save-count {
            display: none !important;
        }
        .meta-item.days-left i {
            color: #d9534f;
        }
        .meta-item.days-left span {
            font-weight: 600;
            color: #d9534f;
        }
    

/* ============================================================
   SPACING — theme-friendly (no forced full-bleed that kills sidebars)
   ============================================================ */

/* Single job header: no glass background / shadow */
.single-job_listing header.entry-header.custom-job-header,
.single-job_listing header.entry-header.djm-job-header,
.single-job header.entry-header.custom-job-header,
.djm-job-header {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 0 1rem !important;
    padding: 0 0 0.75rem !important;
    border-radius: 0 !important;
    text-align: center !important;
}

.single-job_listing header.entry-header.custom-job-header .entry-title,
.djm-job-header .entry-title {
    margin: 0 !important;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem) !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0f172a !important;
}

.single-job_listing .custom-job-header .company-name,
.djm-job-header .company-name {
    display: block !important;
    margin-top: 0.35rem !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

/* Soft vertical spacing only — do NOT override theme container widths */
body.single-job_listing .site-content,
body.post-type-archive-job_listing .site-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

body.single-job_listing .site-main article,
body.single-job_listing .single_job_listing {
    margin-top: 0 !important;
}

/* Meta / actions — fluid, no fixed page width */
.single-job_listing .meta-grid,
.single-job-meta .meta-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 1rem !important;
    padding: 0 !important;
    gap: 0.625rem !important;
    box-sizing: border-box !important;
}

.job-actions-container {
    margin: 0 0 1.25rem !important;
    padding: 0 !important;
}

.job-actions-container .action-buttons {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
}

.djm-application-ends,
.job-actions-container .deadline-text {
    text-align: center !important;
    margin: 0.25rem 0 0.75rem !important;
}

.djm-application-ends .djm-ends-date,
.job-actions-container .deadline-text span {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

/* Related jobs — fluid grid, respects parent width (sidebar-safe) */
.related-jobs-wrapper,
.djm-related-jobs {
    display: block !important;
    visibility: visible !important;
    margin: 1.5rem 0 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.related-jobs-heading {
    margin: 0 0 0.875rem !important;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
}

.related-jobs-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
    gap: 0.875rem !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.related-job-item {
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Listing cards — fluid inside parent */
article.job_listing,
.job_listings article.job_listing {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

ul.job_listings,
div.job_listings {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Homepage job section — fill parent, no forced viewport width */
#job-posting-section.glass-liquid-theme,
#job-posting-section.top-job-section {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-top: 1.25rem !important;
    padding-bottom: 3rem !important;
}

#job-posting-section .container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

#job-posting-section .job-listing-wrapper,
#job-posting-section #jst-results {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Banner — fluid */
.apex-hero {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.apex-hero__wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
