/* =========================================
   QUICK LINKS SECTION (Responsive Width Fix)
   ========================================= */

/* 1. Main Wrapper */
.quick-links-section {
    position: relative;
    z-index: 20; 
}

/* 2. White Card Container (Desktop Default) */
.quick-links-bar {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    
    /* Shadow & Border */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); 
    border: 1px solid rgba(0,0,0,0.02);

    /* DESKTOP: 4 Columns */
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    
    /* Floating Effect */
    margin-top: -70px; 
    margin-bottom: 20px;
    
    width: 100%;
    box-sizing: border-box; 
}

/* 3. Button Styling */
.quick-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    
    border-radius: 8px;
    padding: 15px 15px;
    min-height: 70px;
    width: 100%;
    
    margin-top: 0 !important; 
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    
    word-break: break-word; 
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.quick-link-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
    
}

/* --- TABLET LAYOUT (iPad/Laptop: 768px se 1024px) --- */
@media (max-width: 1024px) {
    .quick-links-bar {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 15px;
        font-size: 15px;
        margin-top: -50px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .quick-link-btn {
        font-size: 15px;
        min-height: 75px;
        padding: 5px 2px;
        border-radius: 6px;
    }
}

/* --- MOBILE LAYOUT (Phones: < 768px) --- */
/* === MAIN FIX IS HERE === */
@media (max-width: 767px) {
    .quick-links-bar {
        grid-template-columns: repeat(2, 1fr); /* 2 Columns */
        gap: 10px;
        padding: 15px;
        border-radius: 10px;
        
        /* FIX: Negative Margin se box ko bahar khinchein */
        /* Top: -30px, Left/Right: -12px (taaki side gap kam ho jaye) */
        margin-top: -80px !important;
        margin-left: -12px !important; 
        margin-right: -12px !important;
        
        /* Important: Width ko auto karein taaki wo fail sake */
        width: auto !important; 
    }

    .quick-link-btn {
        font-size: 14px; /* Thoda aur adjust kiya taaki text na kate */
        min-height: 60px;
        padding: 10px 10px;
        border-radius: 6px;
    }
}

/* Dark Mode Fix */
[data-theme="dark"] .quick-links-bar {
    background-color: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
}

/* --- Front Page Job Sections LAYOUT --- */

/* =========================================
   1. LAYOUT GRID
   ========================================= */
.jobs-container { margin-top: 0px; }
.job-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; } 

.job-column {
    background: var(--card-bg, #fff);
    border-radius: 8px;
    height: fit-content;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color, #eee);
}

.section-header {
    background: linear-gradient(90deg, var(--primary-color, #00b894) 0%, var(--primary-color, #00b894) 100%);
    color: #fff; padding: 10px 15px;
    font-size: 1rem; font-weight: 700; text-transform: uppercase; text-align: center;
}
.job-list { padding: 10px; } 

.section-footer {
    padding: 8px; text-align: center;
    background: var(--primary-color, #00b894);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.view-all-btn { font-size: 0.85rem; font-weight: 600; color: #fff; text-decoration: none; }


/* =========================================
   2. COMPACT JOB CARD (Main Design)
   ========================================= */

.job-card-modern {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px; 
    margin-bottom: 10px;
    position: relative;
    transition: all 0.2s ease;
    display: flex; flex-direction: column;
    height: 100%;
}

.job-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    border-color: var(--primary-color, #00b894);
}

/* 🏷️ STICKER BADGE */
.mt-job-sticker {
    position: absolute; top: 0; left: 0;
    font-size: 9px; font-weight: 800; text-transform: uppercase;
    color: #fff; padding: 2px 8px;
    border-bottom-right-radius: 8px;
    z-index: 10; display: flex; align-items: center; gap: 3px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.15);
}
.mt-sticker-new { background: linear-gradient(135deg, #ff4757, #ff6b81); animation: blink 2s infinite; }
.mt-sticker-update { background: linear-gradient(135deg, #ffa502, #eccc68); }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.8; } 100% { opacity: 1; } }

/* 📦 CARD BODY */
.modern-card-body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-grow: 1;
    width: 100%;
}

/* 🔥 HEIGHT CONTROL: Add padding ONLY if Badge exists */
.job-card-modern.has-badge .modern-card-body {
    padding-top: 15px; 
}

/* 🖼️ THUMBNAIL */
.modern-job-thumb {
    width: 62px; height: 62px;
    flex-shrink: 0;
    border-radius: 6px; overflow: hidden;
    border: 1px solid #f0f0f0; background: #f9f9f9;
    margin: 0; display: block;
}
.modern-job-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 📝 CONTENT WRAPPER */
.modern-job-content {
    flex-grow: 1; width: 100%; min-width: 0;
    display: flex; flex-direction: column; 
    justify-content: space-between;
}

/* Title Styling */
.modern-job-title {
    margin: 0 0 4px 0;
    font-size: 14px; font-weight: 600; line-height: 1.35; color: #2d3436;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
}
/* Hover Colors */
.job-card-modern:hover .modern-job-title a,
.modern-job-title a:hover {
    color: var(--primary-color, #00b894) !important;
    transition: color 0.2s ease;
}
.modern-job-title a { color: inherit; text-decoration: none; }


/* =========================================
   3. FOOTER (Dates & Button)
   ========================================= */

.modern-job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; 
    padding-top: 2px;
    gap: 5px;
    width: 100%;
}

/* Left Group (Dates) */
.mt-footer-left-group {
    display: flex; align-items: center; gap: 5px; 
    /* Flex wrap allowed only if strictly needed, but try to stay inline */
    flex-wrap: nowrap; 
    overflow: hidden; /* Prevent breaking layout */
}

/* 💊 Date Pills */
.mt-date-pill {
    font-size: 9px; font-weight: 700;
    padding: 3px 6px; border-radius: 4px;
    display: inline-flex; align-items: center;
    white-space: nowrap; letter-spacing: 0.2px;
}

/* Colors */
.pill-publish { background-color: var(--primary-color, #00b894); color: #fff; opacity: 0.95; }
.pill-deadline { background-color: #ffecec; color: #d63031; border: 1px solid #fab1a0; }

/* Button Container */
.mt-footer-right { flex-shrink: 0; }

/* Read More Button */
.modern-btn {
    background-color: transparent;
    color: var(--primary-color, #00b894);
    font-size: 10px; font-weight: 700; text-transform: uppercase; text-decoration: none;
    padding: 3px 8px; 
    border: 1px solid var(--primary-color, #00b894);
    border-radius: 4px; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
}

/* Button Hover */
.modern-btn:hover {
    background-color: var(--primary-color, #00b894) !important;
    border-color: var(--primary-color, #00b894) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


/* =========================================
   4. DARK MODE SUPPORT
   ========================================= */

[data-theme="dark"] .job-column { background-color: #2d3436 !important; border-color: #4b6584 !important; }
[data-theme="dark"] .job-card-modern { background-color: #353b48 !important; border-color: #57606f !important; }
[data-theme="dark"] .job-card-modern:hover { border-color: var(--primary-color) !important; background-color: #2f3640 !important; }
[data-theme="dark"] .modern-job-title a { color: #f5f6fa !important; }
[data-theme="dark"] .modern-job-title a:hover { color: var(--primary-color) !important; }

[data-theme="dark"] .modern-job-thumb { border-color: #57606f; background: #2f3640; }

[data-theme="dark"] .pill-publish { color: #fff !important; }
[data-theme="dark"] .pill-deadline { background-color: #2d3436 !important; border-color: #d63031; color: #ff7675 !important; }

[data-theme="dark"] .modern-btn { color: #fff !important; border-color: var(--primary-color) !important; }
[data-theme="dark"] .modern-btn:hover { background-color: var(--primary-color) !important; color: #2d3436 !important; }


/* =========================================
   5. MOBILE RESPONSIVE FIX (Important)
   ========================================= */

@media (max-width: 1024px) { 
    .job-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 768px) {
    /* Single Column Grid */
    .job-grid { grid-template-columns: 1fr; }
    
    .job-card-modern { padding: 8px; }
    
    /* Image Slightly Smaller on Mobile */
    .modern-job-thumb { width: 55px; height: 55px; }
    
    /* Footer: Force Single Line (No Wrapping) */
    .modern-job-footer { 
        flex-wrap: nowrap !important; /* Force items to stay in one line */
        gap: 5px;
    }
    
    /* Left Group: Allow shrinking if needed */
    .mt-footer-left-group {
        flex-shrink: 1; /* Dates can shrink a bit */
        overflow: hidden;
    }
    
    /* Right Button: Never shrink */
    .mt-footer-right {
        flex-shrink: 0;
        margin-top: 0; /* Remove top margin causing gap */
    }
    
    /* Fonts Smaller for Mobile Fit */
    .mt-date-pill {
        font-size: 8px; /* Smaller font to fit both dates */
        padding: 2px 4px;
    }
    
    .modern-btn {
        font-size: 9px; /* Smaller button text */
        padding: 3px 6px;
    }
}


/* =========================================
   JOB DETAILS BOX (Final Design)
   ========================================= */

/* 1. Main Container */
.cisf-job-box {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin: 30px 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: #ffffff;
    max-width: 100%;
}

/* 2. Header (Default Primary Color) */
.cisf-header {
    background: var(--primary-color, #27ae60); /* Default Fallback Green */
    color: #ffffff;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cisf-header .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

/* 3. Body & Grid */
.cisf-body {
    padding: 25px;
}

.cisf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Column Layout */
    gap: 20px;
    margin-bottom: 25px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .cisf-grid {
        grid-template-columns: 1fr; /* 1 Column on Mobile */
        gap: 15px;
    }
}

/* 4. Single Item Design */
.cisf-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Icon Box Design */
.cisf-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.cisf-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Specific Icon Colors (Fixed) */
.salary-icon    { background: #e3f2fd; color: #1976d2; }
.post-icon      { background: #e8eaf6; color: #3f51b5; }
.qual-icon      { background: #f3e5f5; color: #7b1fa2; }
.age-icon       { background: #ffebee; color: #d32f2f; }
.date-icon      { background: #e8f5e9; color: #388e3c; }
.last-date-icon { background: #fff3e0; color: #f57c00; }

/* Text Details */
.cisf-info {
    display: flex;
    flex-direction: column;
}
.cisf-info .label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 2px;
}
.cisf-info .value {
    font-size: 15px;
    font-weight: 700;
    color: #2d3436;
    line-height: 1.3;
}

/* 5. Apply Button Area */
.cisf-cta {
    text-align: center;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #f1f1f1;
}

/* Button Styling */
.apply-btn {
    background: var(--primary-color, #27ae60); /* Default Primary Color */
    color: #ffffff !important;
    padding: 12px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

/* Hover Effect: Only Move Up, No Color Change */
.apply-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    color: #ffffff !important;
}

/* =========================================
   🌑 DARK MODE SUPPORT
   ========================================= */
[data-theme="dark"] .cisf-job-box {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: none;
}
[data-theme="dark"] .cisf-info .value {
    color: #e0e0e0;
}
[data-theme="dark"] .cisf-info .label {
    color: #aaa;
}
[data-theme="dark"] .cisf-cta {
    border-top-color: #333;
}
/* Icons background dark mode adjust */
[data-theme="dark"] .cisf-icon {
    filter: brightness(0.85); /* Thoda dim taki dark mode me bright na lage */
}