.btn {
    text-transform: uppercase !important;
}

.title b {
    font-weight: 500 !important;
}

/* Text grid: full-width top/bottom rules + internal dividers.
   Line color references the design token so it stays on-brand. */
.text-grid--bordered {
    --text-grid-line: var(--gray-color);
    border-top: 1px solid var(--text-grid-line);
    border-bottom: 1px solid var(--text-grid-line);
}

.text-grid--bordered > .text-grid__cell {
    border-left: 1px solid var(--text-grid-line);
}

/* First cell of each row has no left edge (no outer vertical rule). */
.text-grid--bordered > .text-grid__cell.is-row-start {
    border-left: 0;
}

/* Swiper adds a wrapper between the grid and its cells. */
@media (min-width: 769px) {
    /* Divide every row after the first, using the component's row markers. */
    .text-grid--bordered > .text-grid__cell.is-row-start:not(:first-child),
    .text-grid--bordered > .text-grid__cell.is-row-start:not(:first-child) ~ .text-grid__cell {
        border-top: 1px solid var(--text-grid-line);
    }

    .text-grid--bordered > .swiper-wrapper > .swiper-slide:not(.swiper-slide-active) {
        border-left: 1px solid var(--text-grid-line);
    }
}

/* Cell fills the row height so the button can sit at the bottom. */
.text-grid__cell {
    display: flex;
    flex-direction: column;
}

/* Pin the button to the bottom of the cell. */
.text-grid__foot {
    margin-top: auto;
}

/* Contain the floated button so the foot keeps its height. */
.text-grid__foot::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile: single column → dividers flip from vertical to horizontal. */
@media (max-width: 768px) {
    .text-grid--bordered > .text-grid__cell {
        border-left: 0;
        border-top: 1px solid var(--text-grid-line);
    }
    .text-grid--bordered > .text-grid__cell:first-child {
        border-top: 0;
    }
}

/* Team card: la seconda foto è sovrapposta alla principale e compare in
   hover. Su touch (dove l'hover non esiste) resta nascosta e la card
   funziona con la sola foto principale. */
.card-team__hover {
    opacity: 0;
    transition: opacity .4s ease;
}

.card-team__media:hover .card-team__hover {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .card-team__hover {
        transition: none;
    }
}
