/**
 * The Boat Center - Service Jobs Styles
 * BEM Methodology (Block Element Modifier)
 * Mobile-first responsive approach
 *
 * @package TheBoatCenter
 */

/* CSS Variables for theming */
:root {
    --tbc-primary-color: #0073aa;
    --tbc-primary-hover: #005a87;
    --tbc-text-color: #333;
    --tbc-text-light: #666;
    --tbc-bg-light: #f7f7f7;
    --tbc-border-color: #ddd;
    --tbc-spacing-unit: 1rem;
    --tbc-border-radius: 0.25rem;
    --tbc-transition: all 0.3s ease;
}

/* Block: tbc-service-jobs */
.tbc-service-jobs {
    width: 100%;
    margin: 0 auto;
    padding: var(--tbc-spacing-unit);
}

/* Element: list */
.tbc-service-jobs__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--tbc-spacing-unit) * 1.5);
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Element: item */
.tbc-service-jobs__item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--tbc-border-color);
    border-radius: var(--tbc-border-radius);
    overflow: hidden;
    transition: var(--tbc-transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tbc-service-jobs__item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.tbc-service-jobs__item:focus-within {
    outline: 2px solid var(--tbc-primary-color);
    outline-offset: 2px;
}

/* Element: thumbnail */
.tbc-service-jobs__thumbnail {
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.tbc-service-jobs__thumbnail a {
    display: block;
    line-height: 0;
}

.tbc-service-jobs__image {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--tbc-transition);
}

.tbc-service-jobs__thumbnail a:hover .tbc-service-jobs__image,
.tbc-service-jobs__thumbnail a:focus .tbc-service-jobs__image {
    transform: scale(1.05);
}

/* Element: content */
.tbc-service-jobs__content {
    padding: calc(var(--tbc-spacing-unit) * 1.25);
    display: flex;
    flex-direction: column;
    gap: var(--tbc-spacing-unit);
}

/* Element: title */
.tbc-service-jobs__title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 600;
    color: var(--tbc-text-color);
}

.tbc-service-jobs__link {
    color: var(--tbc-text-color);
    text-decoration: none;
    transition: var(--tbc-transition);
}

.tbc-service-jobs__link:hover,
.tbc-service-jobs__link:focus {
    color: var(--tbc-primary-color);
    text-decoration: underline;
}

.tbc-service-jobs__link:focus {
    outline: 2px solid var(--tbc-primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Element: excerpt */
.tbc-service-jobs__excerpt {
    color: var(--tbc-text-light);
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
}

.service-jobs-advanced-filter ul li:first-child {
    display: none !important;
}

/* Element: read-more */
.tbc-service-jobs__read-more {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--tbc-primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: var(--tbc-border-radius);
    font-weight: 500;
    transition: var(--tbc-transition);
    align-self: flex-start;
    margin-top: auto;
    min-height: 44px; /* Touch target size for accessibility */
}

.tbc-service-jobs__read-more:hover,
.tbc-service-jobs__read-more:focus {
    background-color: var(--tbc-primary-hover);
    color: #fff;
    transform: translateX(4px);
}

.tbc-service-jobs__read-more:focus {
    outline: 2px solid var(--tbc-primary-color);
    outline-offset: 4px;
}

/* Screen reader text for accessibility */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Element: no-results */
.tbc-service-jobs__no-results {
    text-align: center;
    padding: calc(var(--tbc-spacing-unit) * 2);
    color: var(--tbc-text-light);
    font-size: 1.125rem;
    background-color: var(--tbc-bg-light);
    border-radius: var(--tbc-border-radius);
    margin: 0;
}

/* Responsive Design - Mobile-first approach */

/* Tablet: 768px and up */
@media (min-width: 768px) {
    .tbc-service-jobs__list {
        grid-template-columns: repeat(2, 1fr);
        gap: calc(var(--tbc-spacing-unit) * 2);
    }

    .tbc-service-jobs__title {
        font-size: 1.75rem;
    }

    .tbc-service-jobs__content {
        padding: calc(var(--tbc-spacing-unit) * 1.5);
    }
}

/* Desktop: 1024px and up */
@media (min-width: 1024px) {
    .tbc-service-jobs__list {
        grid-template-columns: repeat(3, 1fr);
        gap: calc(var(--tbc-spacing-unit) * 2.5);
    }

    .tbc-service-jobs__item {
        height: 100%;
    }

    .tbc-service-jobs__content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
}

/* Large Desktop: 1440px and up */
@media (min-width: 1440px) {
    .tbc-service-jobs {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }

    .tbc-service-jobs__list {
        gap: calc(var(--tbc-spacing-unit) * 3);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tbc-service-jobs__item {
        border: 2px solid var(--tbc-text-color);
    }

    .tbc-service-jobs__read-more {
        border: 2px solid transparent;
    }

    .tbc-service-jobs__read-more:focus {
        border-color: #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tbc-service-jobs__item,
    .tbc-service-jobs__image,
    .tbc-service-jobs__link,
    .tbc-service-jobs__read-more {
        transition: none;
    }

    .tbc-service-jobs__item:hover {
        transform: none;
    }

    .tbc-service-jobs__thumbnail a:hover .tbc-service-jobs__image,
    .tbc-service-jobs__thumbnail a:focus .tbc-service-jobs__image {
        transform: none;
    }
}

/* Print styles */
@media print {
    .tbc-service-jobs__item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .tbc-service-jobs__read-more {
        display: none;
    }
}
