/* --- listings.css --- */

/* 1. Dedicated Container (Fixes width issue) */
.listings-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

/* 2. The Grid System */
.listings-grid {
    display: grid;
    /* This creates a responsive grid: 3 cards on desktop, 1 on mobile */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding-bottom: 50px;
}

/* 3. The Card Design */
.listing-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    /* Ensure it sits above background elements */
    position: relative; 
    z-index: 1; 
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Effect */
.listing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* Card Header Colors */
.listing-card.job { border-top: 5px solid #2563eb; }    /* Blue */
.listing-card.course { border-top: 5px solid #ea580c; } /* Orange */

/* Content Area */
.card-body {
    padding: 25px;
    flex-grow: 1;
    text-align: left; /* Force left alignment */
}

.listing-card h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.listing-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.company-name {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Footer & Button */
.card-footer {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

/* Override any default button styles */
.card-footer .btn-primary {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 12px 0;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
    margin: 0; /* Remove default margins */
}

/* Job Button (Blue) */
.listing-card.job .btn-primary {
    background: #2563eb; 
    color: white;
}
.listing-card.job .btn-primary:hover { background: #1d4ed8; }

/* Course Button (Orange) */
.listing-card.course .btn-primary {
    background: #ea580c; 
    color: white;
}
.listing-card.course .btn-primary:hover { background: #c2410c; }

/* Tag Styles */
.tag {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
.tag.blue { background: #e0f2fe; color: #0284c7; }
.tag.orange { background: #ffedd5; color: #c2410c; }