/**
 * Job Grid Component Styles
 * 
 * @package Blocksy_Child
 */

/* ============================================
   JOBS GRID
   ============================================ */

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* ============================================
   JOB CARD
   ============================================ */

.job-card {
    position: relative;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.job-card-link {
    display: flex;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    padding: 20px;
    text-decoration: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        transparent 100%
    );
}

.job-card-content {
    width: 100%;
}

.job-card-title {
    margin: 0 0 8px 0;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.country-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
}

.country-flag {
    width: 20px;
    height: 20px;
    border-radius: 2px;
    object-fit: cover;
}

.country-name {
    font-family: var(--font-condensed);
    font-size: 14px;
    font-weight: 500;
    color: var(--theme-palette-color-3);
}

/* ============================================
   SKELETON LOADING
   ============================================ */

.skeleton-container {
    display: none;
    margin-bottom: 24px;
}

.skeleton-container.is-loading {
    display: block;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.job-card-skeleton {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 50%,
        #f0f0f0 100%
    );
    border-radius: 8px;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Spinner on each skeleton */
.job-card-skeleton::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(227, 10, 108, 0.2);
    border-top-color: var(--theme-palette-color-1);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

.skeleton-title {
    height: 20px;
    width: 70%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-tag {
    height: 24px;
    width: 120px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

/* ============================================
   RESPONSIVE - Tablet (< 1000px)
   ============================================ */

@media (max-width: 999px) {
    .jobs-grid,
    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESPONSIVE - Mobile (< 690px)
   ============================================ */

@media (max-width: 689px) {
    .jobs-grid,
    .skeleton-grid {
        grid-template-columns: 1fr;
    }
    
    .job-card-title {
        font-size: 16px;
    }
    
    .country-name {
        font-size: 13px;
    }
}