/*
---------------------
Module Jobs - Job Teaser Boxes
---------------------
*/

/* CSS Variables */
.fhb-jobs {
    --fhb-jobs-card-bg: #F7F7F5;
    --fhb-jobs-card-bg-highlighted: #323F6E;
    --fhb-jobs-gap: 30px;
}


/* Container 
----------- */

.fhb-jobs {
    width: 100%;
}

.fhb-jobs__container {
    max-width: 1200px;
    margin: 0 auto;
}


/* Grid Layout 
----------- */

.fhb-jobs__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--fhb-jobs-gap);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .fhb-jobs__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .fhb-jobs__grid {
        grid-template-columns: 1fr;
    }

    .fhb-jobs {
        padding: 40px 0;
    }

    .fhb-jobs__container {
        padding: 0 15px;
    }
}


/* Job Card 
----------- */

.fhb-jobs__card {
    display: flex;
    flex-direction: column;
    background-color: var(--fhb-jobs-card-bg);
    overflow: hidden;
}


/* Highlighted Card Variant */
.fhb-jobs__card--highlighted {
    background-color: var(--fhb-jobs-card-bg-highlighted);
}

/* Hide the highlight badge */
.fhb-jobs__card-badge {
    display: none;
}



/* Card Image 
----------- */

.fhb-jobs__card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: #f0f0f0;
}

.fhb-jobs__card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.fhb-jobs__card:hover .fhb-jobs__card-image {
    transform: scale(1.05);
}


/* Highlight Badge */
.fhb-jobs__card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}


/* Card Content 
----------- */

.fhb-jobs__card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 24px;
}

.fhb-jobs__card-title {
    margin: 0 0 12px 0;
}

.fhb-jobs__card-description {
    flex-grow: 1;
    margin-bottom: 20px;
}

/* WYSIWYG Content Reset */
.fhb-jobs__card-description p {
    margin: 0 0 1em 0;
}

.fhb-jobs__card-description p:last-child {
    margin-bottom: 0;
}

.fhb-jobs__card-description ul,
.fhb-jobs__card-description ol {
    margin: 0 0 1em 1.5em;
    padding: 0;
}

.fhb-jobs__card-description ul:last-child,
.fhb-jobs__card-description ol:last-child {
    margin-bottom: 0;
}


/* Card Actions 
----------- */

.fhb-jobs__card-actions {
    margin-top: auto;
    padding-top: 8px;
}


/* Animation on Load 
----------- */

@keyframes fhb-jobs-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fhb-jobs__card {
    animation: fhb-jobs-fadeInUp 500ms ease-out both;
}

/* Staggered animation delays */
.fhb-jobs__card:nth-child(1) { animation-delay: 0ms; }
.fhb-jobs__card:nth-child(2) { animation-delay: 100ms; }
.fhb-jobs__card:nth-child(3) { animation-delay: 200ms; }
.fhb-jobs__card:nth-child(4) { animation-delay: 300ms; }
.fhb-jobs__card:nth-child(5) { animation-delay: 400ms; }
.fhb-jobs__card:nth-child(6) { animation-delay: 500ms; }
.fhb-jobs__card:nth-child(7) { animation-delay: 600ms; }
.fhb-jobs__card:nth-child(8) { animation-delay: 700ms; }
.fhb-jobs__card:nth-child(9) { animation-delay: 800ms; }


/* Print Styles 
----------- */

@media print {
    .fhb-jobs__card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}
