/* [br_featured_projects] - includes/featured-projects.php. Design:
   html/home.html, section #projects. */

.br-fprojects,
.br-fprojects *,
.br-fprojects *::before,
.br-fprojects *::after {
    box-sizing: border-box;
}

.br-fprojects {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.4rem;
    font-family: var(--font-body);
}

.br-fproj {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-width: 0;
    min-height: 420px;
    overflow: hidden;
    color: #fff;
    background: var(--night);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.br-fproj--lg { grid-column: span 7; }
.br-fproj--sm { grid-column: span 5; }
.br-fproj--half { grid-column: span 6; min-height: 340px; }
.br-fproj--full { grid-column: span 12; min-height: 380px; }

.br-fproj:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-soft);
}

.br-fproj .br-fproj__img {
    position: absolute;
    inset: 0;
    z-index: -2;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    border-radius: 0;
    transition: transform 1.2s var(--ease);
}

.br-fproj__img--empty {
    background: linear-gradient(135deg, #3a2c1f, var(--night));
}

.br-fproj:hover .br-fproj__img {
    transform: scale(1.06);
}

.br-fproj::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(200deg, rgba(28, 22, 16, 0) 30%, rgba(28, 22, 16, 0.82) 92%);
    pointer-events: none;
}

.br-fproj__body {
    width: 100%;
    min-width: 0;
    padding: 1.8rem;
}

.br-fproj__tag {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 0.8rem;
    padding: 0.35rem 0.8rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-pill);
}

.br-fproj .br-fproj__title {
    margin: 0 0 0.3rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.2;
    color: #fff;
    overflow-wrap: anywhere;
}

.br-fproj .br-fproj__link,
.br-fproj .br-fproj__link:hover,
.br-fproj .br-fproj__link:visited {
    color: #fff !important;
    text-decoration: none !important;
}

/* Whole card is the link's hit area. */
.br-fproj__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

.br-fproj__link:focus-visible {
    outline: none;
}

.br-fproj:has(.br-fproj__link:focus-visible) {
    outline: 2px solid var(--ember);
    outline-offset: 3px;
}

.br-fproj__meta {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #fff;
    opacity: 0.9;
}

.br-fproj__meta svg {
    flex: none;
    width: 14px;
    height: 14px;
    margin-top: 0.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.br-fproj__price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.9rem;
}

.br-fproj__price b {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: #fff;
}

.br-fproj__arrow {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    color: var(--ink);
    background: var(--card);
    border-radius: 50%;
    transition: 0.35s var(--ease);
}

.br-fproj__arrow svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.br-fproj:hover .br-fproj__arrow {
    color: #fff;
    background: var(--ember);
    transform: rotate(45deg);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .br-fproj--lg,
    .br-fproj--sm,
    .br-fproj--half,
    .br-fproj--full {
        grid-column: span 12;
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .br-fprojects {
        gap: 1rem;
    }

    .br-fproj--lg,
    .br-fproj--sm,
    .br-fproj--half,
    .br-fproj--full {
        min-height: 320px;
        border-radius: 22px;
    }

    .br-fproj__body {
        padding: 1.3rem;
    }

    .br-fproj .br-fproj__title {
        font-size: 1.35rem;
    }

    .br-fproj__price b {
        font-size: 1.15rem;
    }

    .br-fproj__arrow {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .br-fproj,
    .br-fproj .br-fproj__img,
    .br-fproj__arrow {
        transition: none;
    }

    .br-fproj:hover,
    .br-fproj:hover .br-fproj__img {
        transform: none;
    }
}

/* Hide the section when there are no featured projects (body flag from
   br_featured_projects_body_classes()). */
.br-no-featured-projects .br-hide-if-no-featured-projects {
    display: none !important;
}
