.specialties-hero {
    position: relative;
    padding: 6rem 0;
    background-image: url('/assets/imgs/ambiente-de-atendimento-odontológico.jpeg');
    background-size: cover;
    background-position: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.specialties-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.65);
}

.specialties-hero-content {
    position: relative;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.specialties-hero p {
    margin-top: 0.5rem;
    opacity: 0.8;
}

.specialties-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.specialty-item {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: center;
    background: var(--secondary-bg-color);
    border-radius: 1rem;
    padding: 2.5rem 3rem;
    text-decoration: none;
    color: inherit;
    min-height: 240px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    max-width: 800px;
}

.specialty-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1080 / 785;
    object-fit: cover;
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
}

.specialty-item:hover img {
    transform: scale(1.03);
}

.specialty-item.reverse {
    grid-template-columns: 1fr 240px;
    padding-left: 3rem;
    padding-right: 2.5rem;
}

.specialty-item.reverse img {
    order: 2;
}

.specialty-item.reverse .specialty-content {
    order: 1;
}

.specialty-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.specialty-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.specialty-content h2 {
    opacity: 1;
    font-weight: 600;
    line-height: 1.5;
    font-size: 1.3rem;
}

.specialty-content p {
    opacity: 0.75;
    line-height: 1.5;
    font-size: 1.1rem;
}

.specialties-list .container {
    max-width: 900px;
}

.card-link {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
}

.card-link:hover {
    color: var(--secondary-color);
}

@media (max-width: 700px) {
    .specialty-item,
    .specialty-item.reverse {
        grid-template-columns: 1fr;
    }

    .specialty-item img {
        height: 200px;
    }

    .specialty-item.reverse img,
    .specialty-item.reverse .specialty-content {
        order: initial;
    }
}