/**
 * Team Filter Grid — Base Styles
 *
 * Colors, sizes, paddings, radii, typo etc. are controlled
 * via Elementor controls (selectors). This file provides
 * structural layout and sensible defaults only.
 */

/* =========================================
   WRAPPER
   ========================================= */

.bew-team-filter-grid {
    width: 100%;
}

/* =========================================
   FILTER BAR
   ========================================= */

.bew-tfg-filter-group__buttons {
    display: flex;
    flex-wrap: wrap;
}

.bew-tfg-filter-group__title {
    margin-top: 0;
}

/* Filter Button base */
.bew-tfg-filter-btn {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    user-select: none;
    border-style: solid;
    -webkit-clip-path: none !important;
    clip-path: none !important;
    will-change: auto;
}

.bew-tfg-filter-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Filter Actions Row */
.bew-tfg-filter-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.bew-tfg-reset-btn {
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bew-tfg-result-count__num {
    font-weight: 700;
}


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

.bew-tfg-grid {
    display: grid;
    grid-template-columns: repeat(var(--tfg-columns, 4), 1fr);
}

/* ── Card ── */
.bew-tfg-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.bew-tfg-card.is-hidden {
    display: none;
}

/* ── Card Image ── */
.bew-tfg-card__image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #e0e0e0;
}

.bew-tfg-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.4s ease, transform 0.5s ease;
}

/* Grayscale toggle via PHP class */
.bew-tfg-card__image.bew-tfg-grayscale img {
    filter: grayscale(100%);
}

.bew-tfg-card:hover .bew-tfg-card__image.bew-tfg-grayscale img {
    filter: grayscale(0%);
}

/* Hover overlay gradient */
.bew-tfg-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.bew-tfg-card:hover .bew-tfg-card__image::after {
    opacity: 1;
}

/* ── Card Info ── */
.bew-tfg-card__info {
    transition: background-color 0.3s ease;
}

.bew-tfg-card__name {
    margin-top: 0;
    line-height: 1.3;
    transition: color 0.25s ease;
}

.bew-tfg-card__position,
.bew-tfg-card__location,
.bew-tfg-card__lawyer-types,
.bew-tfg-card__tech-areas {
    display: block;
    transition: color 0.25s ease;
}

.bew-tfg-card__location {
    text-transform: uppercase;
    letter-spacing: 0.8px;
}


/* =========================================
   NO RESULTS
   ========================================= */

.bew-tfg-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}


/* =========================================
   MODAL
   ========================================= */

body.bew-tfg-modal-open {
    overflow: hidden;
}

.bew-tfg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bew-tfg-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.bew-tfg-modal__backdrop {
    position: absolute;
    inset: 0;
}

.bew-tfg-modal__content {
    position: relative;
    width: 90%;
    max-height: 90vh;
    z-index: 10;
}

.bew-tfg-modal__inner {
    display: flex;
    color: #fff;
    overflow-y: auto;
    max-height: 90vh;
    border-radius: 4px;
}

.bew-tfg-modal__image-col {
    width: 40%;
    flex-shrink: 0;
    position: relative;
}

.bew-tfg-modal__image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.bew-tfg-modal__info-col {
    width: 60%;
    position: relative;
    margin-top: 32px;
    margin-left: -50px;
}

.bew-tfg-modal__green-circle {
    position: absolute;
    top: 20px;
    left: -30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 5;
    border-width: 12px;
    border-style: solid;
    opacity: 0.6;
}

.bew-tfg-modal__name {
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.bew-tfg-modal__meta {
    margin-bottom: 25px;
}

.bew-tfg-modal__position {
    display: block;
    margin-bottom: 5px;
    font-style: italic;
}

.bew-tfg-modal__location {
    display: block;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.bew-tfg-modal__lawyer-types {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    opacity: 0.9;
}

.bew-tfg-modal__technical-areas {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    opacity: 0.9;
}

.bew-tfg-modal__meta span:empty {
    display: none;
}

.bew-tfg-modal__description p {
    margin-bottom: 1em;
}


/* =========================================
   RESPONSIVE  — Modal only
   Grid columns are handled by Elementor
   responsive controls now.
   ========================================= */

@media (max-width: 768px) {
    .bew-tfg-modal__inner {
        flex-direction: column;
        max-height: 85vh;
    }

    .bew-tfg-modal__image-col {
        width: 100%;
        height: 300px;
    }

    .bew-tfg-modal__info-col {
        width: 100%;
        margin: 0;
    }

    .bew-tfg-modal__green-circle {
        top: -30px;
        right: 32px;
        left: unset;
    }
}

@media (max-width: 480px) {
    .bew-tfg-modal__image-col {
        height: 250px;
    }
}
