/**
 * YSDI Govt Jobs Pro - Complete Styles
 * Version: 4.0
 */

/* ============================================================
   GLOBAL WRAPPER
   ============================================================ */
.ysdi-govt-wrapper {
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.ysdi-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    align-items: center;
}
.ysdi-filter-bar select,
.ysdi-filter-bar button {
    padding: 9px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 0.95rem;
    transition: all 0.2s;
    min-width: 140px;
}
.ysdi-filter-bar select:hover {
    border-color: #007cba;
}
.ysdi-filter-bar select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
}
.ysdi-filter-bar button {
    background: #007cba;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    min-width: 120px;
}
.ysdi-filter-bar button:hover {
    background: #005a87;
}

/* ============================================================
   JOBS GRID
   ============================================================ */
.ysdi-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 24px;
}

/* ============================================================
   JOB CARD
   ============================================================ */
.ysdi-job-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px 22px 18px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}
.ysdi-job-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}
.ysdi-job-card.priority-high {
    border-left: 5px solid #d63638;
}
.ysdi-job-card.priority-medium {
    border-left: 5px solid #f0b849;
}
.ysdi-job-card.priority-low {
    border-left: 5px solid #7b8a9b;
}
.ysdi-job-card.expired {
    opacity: 0.85;
    background: #fafafa;
    border-color: #dee2e6;
}

/* Card Header */
.ysdi-job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}
.ysdi-job-header > div {
    flex: 1;
}
.ysdi-job-org {
    font-size: 0.75rem;
    color: #007cba;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.ysdi-job-title {
    margin: 4px 0 2px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
}
.ysdi-job-title a {
    color: inherit;
    text-decoration: none;
}
.ysdi-job-title a:hover {
    color: #007cba;
}
.ysdi-job-post {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Badges */
.ysdi-expired-badge {
    background: #6c757d;
    color: #fff;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.ysdi-upcoming-badge {
    background: #f0b849;
    color: #1d2327;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    white-space: nowrap;
}
.ysdi-urgent-badge {
    background: #d63638;
    color: #fff;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    white-space: nowrap;
    animation: pulse 1.5s infinite;
}
.ysdi-days-badge {
    background: #f0b849;
    color: #1d2327;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    white-space: nowrap;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Details Grid */
.ysdi-job-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.ysdi-job-details div {
    padding: 3px 0;
}
.ysdi-job-details strong {
    color: #495057;
}
.ysdi-deadline-field {
    grid-column: 1 / -1;
    margin-top: 4px;
    font-weight: 500;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 6px;
}
.ysdi-deadline-expired {
    text-decoration: line-through;
    color: #d63638;
}
.ysdi-days-left {
    font-weight: normal;
    color: #007cba;
    margin-left: 4px;
}
.ysdi-exam-countdown {
    color: #d63638;
    font-weight: 500;
}

/* Description */
.ysdi-job-description {
    font-size: 0.85rem;
    color: #495057;
    margin: 6px 0 12px;
    line-height: 1.5;
}

/* Footer */
.ysdi-job-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e9ecef;
    padding-top: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.ysdi-job-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ysdi-view-detail-btn {
    background: #f1f3f5;
    color: #1d2327;
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}
.ysdi-view-detail-btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
}
.ysdi-apply-btn {
    background: #007cba;
    color: #fff;
    padding: 6px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}
.ysdi-apply-btn:hover {
    background: #005a87;
    color: #fff;
}
.ysdi-priority-badge {
    font-size: 0.65rem;
    padding: 3px 12px;
    border-radius: 20px;
    background: #e9ecef;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.ysdi-priority-badge.high {
    background: #d63638;
    color: #fff;
}
.ysdi-priority-badge.medium {
    background: #f0b849;
    color: #1d2327;
}
.ysdi-priority-badge.low {
    background: #7b8a9b;
    color: #fff;
}

/* ============================================================
   NO JOBS MESSAGE
   ============================================================ */
.ysdi-no-jobs {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    padding: 50px 0;
    font-size: 1.1rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.ysdi-pagination {
    margin-top: 30px;
    text-align: center;
}
.ysdi-page-link {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: #f1f3f5;
    color: #1d2327;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.ysdi-page-link.active {
    background: #007cba;
    color: #fff;
    cursor: default;
    border-color: #007cba;
}
.ysdi-page-link:hover:not(.active) {
    background: #e9ecef;
    border-color: #dee2e6;
}

/* ============================================================
   ANIMATED FLASH BANNER
   ============================================================ */
.ysdi-flash-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto 30px;
    overflow: hidden;
    background: linear-gradient(145deg, #1a2332, #2d3b4f);
    border-radius: 16px;
    color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.ysdi-flash-container {
    position: relative;
    min-height: 180px;
}
.ysdi-flash-card {
    display: none;
    padding: 30px 40px;
    animation: fadeSlide 0.6s ease;
}
.ysdi-flash-card.active {
    display: block;
}
@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.ysdi-flash-org {
    font-size: 0.8rem;
    color: #8ab4f8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ysdi-flash-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 6px 0 12px;
    line-height: 1.2;
}
.ysdi-flash-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 1.1rem;
    margin: 8px 0;
}
.ysdi-flash-vacancy {
    background: #d63638;
    padding: 4px 18px;
    border-radius: 30px;
    font-weight: 700;
    animation: pulse 2s infinite;
}
.ysdi-flash-salary {
    background: #f0b849;
    color: #1d2327;
    padding: 4px 18px;
    border-radius: 30px;
    font-weight: 700;
}
.ysdi-flash-state {
    font-size: 0.95rem;
    opacity: 0.8;
    margin: 4px 0;
}
.ysdi-flash-apply {
    display: inline-block;
    margin-top: 12px;
    background: #007cba;
    color: #fff;
    padding: 10px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}
.ysdi-flash-apply:hover {
    background: #005a87;
    color: #fff;
    transform: scale(1.02);
}
.ysdi-flash-deadline {
    margin-top: 10px;
    font-size: 0.85rem;
    opacity: 0.6;
}
.ysdi-flash-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 20px;
}
.ysdi-flash-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.3s;
}
.ysdi-flash-dot.active {
    background: #fff;
    transform: scale(1.25);
}
.ysdi-flash-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* ============================================================
   JOB DETAIL VIEW
   ============================================================ */
.ysdi-job-detail-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}
.ysdi-job-detail-header {
    border-bottom: 2px solid #f1f3f5;
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.ysdi-job-detail-header h1 {
    font-size: 2rem;
    margin: 0 0 10px;
    color: #1d2327;
}
.ysdi-job-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ysdi-job-detail-meta span {
    padding: 4px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
}
.ysdi-job-detail-meta .ysdi-org {
    background: #e3f0fa;
    color: #007cba;
}
.ysdi-job-detail-meta .ysdi-dept {
    background: #f1f3f5;
    color: #495057;
}
.ysdi-job-detail-meta .ysdi-status.live {
    background: #d4edda;
    color: #155724;
}
.ysdi-job-detail-meta .ysdi-status.upcoming {
    background: #fff3cd;
    color: #856404;
}
.ysdi-job-detail-meta .ysdi-status.expired {
    background: #f8d7da;
    color: #721c24;
}

/* Countdown Timer */
.ysdi-countdown-wrapper {
    background: #f0f7ff;
    padding: 16px 24px;
    border-radius: 10px;
    margin: 16px 0 20px;
    text-align: center;
    border: 1px solid #d6e9ff;
}
.ysdi-countdown-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #1d2327;
}
.ysdi-countdown {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}
.ysdi-countdown span {
    background: #1d2327;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    min-width: 75px;
    text-align: center;
}
.ysdi-countdown-expired {
    font-size: 1.2rem;
    color: #d63638;
    font-weight: 700;
}

/* WhatsApp Share */
.ysdi-share-section {
    margin: 16px 0 24px;
    text-align: center;
}
.ysdi-whatsapp-share {
    display: inline-block;
    background: #25D366;
    color: #fff;
    padding: 10px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}
.ysdi-whatsapp-share:hover {
    background: #128C7E;
    color: #fff;
    transform: scale(1.02);
}

/* Detail Sections */
.ysdi-job-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .ysdi-job-detail-grid {
        grid-template-columns: 1fr;
    }
}
.ysdi-detail-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 18px 20px;
    border: 1px solid #e9ecef;
}
.ysdi-detail-section h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #1d2327;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}
.ysdi-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.ysdi-detail-table tr {
    border-bottom: 1px solid #e9ecef;
}
.ysdi-detail-table tr:last-child {
    border-bottom: none;
}
.ysdi-detail-table td {
    padding: 6px 4px;
}
.ysdi-detail-table td:first-child {
    font-weight: 600;
    color: #495057;
    width: 40%;
}
.ysdi-full-description {
    line-height: 1.8;
    color: #212529;
}
.ysdi-faq {
    line-height: 1.8;
    color: #212529;
}

/* ============================================================
   SUBSCRIPTION FORM
   ============================================================ */
.ysdi-alerts-wrapper {
    background: #f8f9fa;
    padding: 25px 30px;
    border-radius: 12px;
    max-width: 520px;
    margin: 20px auto;
    border: 1px solid #e9ecef;
}
.ysdi-alerts-wrapper h3 {
    margin: 0 0 6px;
    color: #1d2327;
}
.ysdi-alerts-wrapper p {
    color: #6c757d;
    margin-bottom: 16px;
}
.ysdi-subscribe-row {
    margin: 10px 0;
}
.ysdi-subscribe-row input,
.ysdi-subscribe-row select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.ysdi-subscribe-row input:focus,
.ysdi-subscribe-row select:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.12);
}
.ysdi-subscribe-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    margin-top: 6px;
}
.ysdi-subscribe-btn:hover {
    background: #005a87;
}
#ysdi-subscribe-message {
    margin-top: 14px;
    font-weight: 500;
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .ysdi-jobs-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 600px) {
    .ysdi-jobs-grid {
        grid-template-columns: 1fr;
    }
    .ysdi-filter-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    .ysdi-filter-bar select,
    .ysdi-filter-bar button {
        width: 100%;
        min-width: unset;
    }
    .ysdi-job-details {
        grid-template-columns: 1fr;
    }
    .ysdi-job-header {
        flex-wrap: wrap;
    }
    .ysdi-flash-card {
        padding: 20px;
    }
    .ysdi-flash-title {
        font-size: 1.3rem;
    }
    .ysdi-countdown {
        font-size: 1.2rem;
        gap: 8px;
        flex-wrap: wrap;
    }
    .ysdi-countdown span {
        min-width: 60px;
        padding: 6px 12px;
    }
    .ysdi-job-detail-wrapper {
        padding: 12px;
    }
    .ysdi-job-detail-header h1 {
        font-size: 1.4rem;
    }
    .ysdi-alerts-wrapper {
        padding: 18px;
        margin: 10px;
    }
}