/*
Theme Name: ZAIN Theme
Theme URI: https://www.STIJOBS.COOM.pk
Author: Al Raza Services
Description: Mobile Responsive Fixed Version.
Version: 2.1
*/

:root {
    --primary: #228b22; /* NJP Green */
    --dark: #006400;
    --light: #f4f6f9;
    --text: #333;
    --white: #ffffff;
}

/* Base Settings */
* { box-sizing: border-box; } /* Yeh line mobile layout ke liye zaroori hai */

body { 
    font-family: 'Roboto', sans-serif; 
    margin: 0; 
    padding: 0; 
    background: var(--light); 
    color: var(--text);
    overflow-x: hidden; /* Side scrolling roknay ke liye */
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

.container { 
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; /* Mobile par side mein thodi jagah */
}

.btn { 
    background: var(--primary); 
    color: white; 
    padding: 12px 20px; 
    border-radius: 4px; 
    display: inline-block; 
    font-weight: bold; 
    border: none; 
    cursor: pointer; 
    text-align: center;
}

/* --- HEADER (Mobile Friendly) --- */
.site-header { background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 15px 0; position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; position: relative; }
.logo { font-size: 20px; font-weight: 800; color: var(--primary); text-transform: uppercase; }

/* Menu Desktop */
.main-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.mobile-toggle { display: none; font-size: 28px; cursor: pointer; color: var(--primary); }

/* --- HERO SECTION --- */
.hero-section {
    background: linear-gradient(rgba(0,50,0,0.8), rgba(0,50,0,0.8)), url('https://www.njp.gov.pk/images/banner.jpg');
    background-size: cover; background-position: center;
    padding: 60px 0; text-align: center; color: var(--white);
    border-bottom: 5px solid var(--primary);
}
.hero-title { font-size: 2rem; margin-bottom: 10px; line-height: 1.2; }
.hero-section p { font-size: 1rem; padding: 0 10px; }

/* Search Form (Mobile Optimized) */
.search-form { 
    background: rgba(255,255,255,0.95); 
    padding: 15px; 
    border-radius: 8px; 
    display: flex; 
    flex-wrap: wrap; /* Items ko neeche girne deta hai */
    gap: 10px; 
    margin-top: 20px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
    width: 100%;
}
.search-form input, .search-form select { 
    flex: 1; /* Jagah barabar le */
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    min-width: 200px; /* Choti screen par full width ho jaye */
    width: 100%;
}
.search-form button { width: 100%; } /* Mobile par button full width */

/* --- STATS --- */
.stats-bar { margin-top: 0; padding: 30px 0; background: white; border-bottom: 1px solid #eee; }
.stats-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.stat-card { 
    background: var(--light); 
    padding: 20px; 
    border-radius: 6px; 
    text-align: center; 
    width: 30%; /* Desktop par 3 hisse */
    min-width: 150px; 
    border-top: 4px solid var(--primary); 
}
.stat-number { font-size: 24px; font-weight: bold; color: var(--primary); display: block; }

/* --- JOBS GRID --- */
.section-title { text-align: center; margin: 40px 0 20px; font-size: 1.8rem; color: #222; }
.jobs-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Auto adjust columns */
    gap: 20px; 
    padding-bottom: 50px; 
}
.job-card { background: var(--white); border: 1px solid #e1e1e1; border-radius: 8px; overflow: hidden; }
.job-body { padding: 15px; }
.job-title { font-size: 18px; margin: 10px 0; font-weight: 700; }
.dept-badge { font-size: 11px; padding: 4px 10px; }

/* --- FOOTER --- */
.site-footer { background: #222; color: #fff; padding: 30px 15px; text-align: center; }
.footer-links { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }

/* =========================================
   MOBILE RESPONSIVE (Strict Rules)
   ========================================= */
@media (max-width: 768px) {
    /* Header Fix */
    .mobile-toggle { display: block; }
    .main-nav { 
        display: none; /* JS isay 'flex' karega jab click hoga */
        position: absolute; 
        top: 100%; left: 0; right: 0; 
        background: white; 
        box-shadow: 0 5px 10px rgba(0,0,0,0.1); 
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    .main-nav.active { display: flex; } /* Yeh JS se activate hoga */
    .main-nav ul { flex-direction: column; gap: 15px; }

    /* Hero Fix */
    .hero-title { font-size: 1.5rem; }
    .search-form { flex-direction: column; } /* Search inputs ooper neeche */
    
    /* Stats Fix */
    .stat-card { width: 100%; margin-bottom: 10px; } /* Stats full width */
    
    /* Grid Fix */
    .jobs-grid { grid-template-columns: 1fr; } /* Ek line mein ek job */
    .job-card { margin: 0 auto; width: 100%; }
}
/* --- JOB CARD IMAGE STYLING --- */

/* Image ka container */
.card-image-wrapper {
    width: 100%;
    height: 180px; /* Card mein image ki height fix ki taake sab barabar lagen */
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

/* Asal Image */
.job-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Image ko kate baghair fit karega */
    transition: transform 0.3s;
}

/* Mouse le jane par thoda zoom ho (Optional style) */
.job-card:hover .job-grid-img {
    transform: scale(1.05);
}