/*
Theme Name: Punjab Police Jobs Fancy
Description: Fully animated, modern, and SEO-optimized theme.
Version: 2.0
*/

:root {
    --primary-blue: #001C55;
    --primary-red: #D21022;
    --white: #ffffff;
    --bg-light: #f0f4f8;
    --text-dark: #2d3748;
    --text-gray: #718096;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, Helvetica, sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Fancy Header with Animated Gradient */
.site-header {
    background: linear-gradient(-45deg, #001C55, #002b80, #D21022, #a00b18);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.site-header h1 a {
    color: var(--white);
    text-decoration: none;
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 50px 20px; }

/* Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
}

/* ---------------------------------
   Fancy Card Animations & Styling
----------------------------------- */
.job-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,28,85,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    border-bottom: 5px solid var(--primary-blue);
    /* Entry Animation */
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s forwards;
}

/* Delay for staggered loading effect */
.job-card:nth-child(1) { animation-delay: 0.1s; }
.job-card:nth-child(2) { animation-delay: 0.3s; }
.job-card:nth-child(3) { animation-delay: 0.5s; }
.job-card:nth-child(4) { animation-delay: 0.7s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.job-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(210, 16, 34, 0.2);
    border-bottom-color: var(--primary-red);
}

/* Badge (E.g. New Job) */
.job-badge {
    position: absolute;
    top: 15px;
    right: -35px;
    background: var(--primary-red);
    color: var(--white);
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: bold;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(210, 16, 34, 0.4);
    z-index: 10;
}

.job-content { padding: 30px; flex-grow: 1; position: relative; z-index: 1; }

.job-title { font-size: 1.5rem; margin-bottom: 15px; line-height: 1.3; }

.job-title a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.job-card:hover .job-title a { color: var(--primary-red); }

.job-excerpt { color: var(--text-gray); font-size: 1rem; margin-bottom: 25px; }

/* ---------------------------------
   Animated Shiny Button
----------------------------------- */
.read-more-btn {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-blue), #003399);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 28, 85, 0.3);
    text-align: center;
}

/* Shiny Sweep Animation */
.read-more-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
}

.read-more-btn:hover {
    background: linear-gradient(90deg, var(--primary-red), #ff1a30);
    box-shadow: 0 8px 25px rgba(210, 16, 34, 0.4);
    transform: translateY(-2px);
}

.read-more-btn:hover::after {
    left: 125%;
    transition: all 0.75s ease;
}