/* =========================================
   Um Ecossistema de Saúde de Alto Padrão
========================================= */
.ecosystem {
    display: flex;
    align-items: center;
    gap: 42px;
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 0 24px;
}

.ecosystem__gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    flex: 0 0 auto;
    width: 100%;
    max-width: 562px;
}

.ecosystem__gallery-main {
    grid-column: 1 / -1;
}

.ecosystem__gallery-main,
.ecosystem__gallery-item {
    border-radius: 16px;
    overflow: hidden;
    height: 272px;
}

.ecosystem__gallery-main img,
.ecosystem__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ecosystem__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.ecosystem__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 50px;
    line-height: 1.3;
    width: 100%;
}

.ecosystem__desc {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 20px;
    line-height: 1.4;
    width: 100%;
}

.ecosystem__divider {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--borda-tan);
}

@media (max-width: 1199px) {
    .ecosystem {
        flex-direction: column;
        margin-top: 80px;
    }

    .ecosystem__gallery {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .ecosystem__gallery-main,
    .ecosystem__gallery-item {
        height: 200px;
    }

    .ecosystem__title {
        font-size: 36px;
    }

    .ecosystem__desc {
        font-size: 18px;
    }
}

/* =========================================
   O que significa ser um ecossistema
========================================= */
.meaning {
    max-width: 1200px;
    margin: 120px auto 0;
    padding: 0 24px;
}

.meaning__card {
    position: relative;
    background-color: var(--cinza);
    border: 1px solid var(--borda-tan);
    border-radius: 20px;
    box-shadow: var(--sombra-card);
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
}

.meaning__selo {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 167px;
    height: 167px;
}

.meaning__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.3;
    max-width: 776px;
    width: 100%;
}

.meaning__desc {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 20px;
    line-height: 1.4;
    max-width: 778px;
    width: 100%;
}

@media (max-width: 767px) {
    .meaning {
        margin-top: 100px;
    }

    .meaning__card {
        padding: 70px 24px 48px;
    }

    .meaning__selo {
        width: 120px;
        height: 120px;
    }

    .meaning__title {
        font-size: 32px;
    }

    .meaning__desc {
        font-size: 18px;
    }
}

/* Faixa deslizante entre as seções */
.marquee {
    margin-top: 120px;
}

@media (max-width: 767px) {
    .marquee {
        margin-top: 100px;
    }
}

/* =========================================
   Venha viver uma experiência Rauen
========================================= */
.experience {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 0 24px;
    text-align: center;
}

.experience__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.3;
    max-width: 595px;
    margin: 0 auto;
}

.experience__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 230px 230px;
    gap: 20px;
    max-width: 794px;
    margin: 40px auto 0;
}

.experience-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--sombra-card);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    text-align: left;
}

.experience-card--tall {
    grid-row: span 2;
}

.experience-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.experience-card:hover .experience-card__img {
    transform: scale(1.06);
}

.experience-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(47deg,
            rgba(10, 6, 1, 0.8) 1%,
            rgba(10, 6, 1, 0.7) 26%,
            rgba(10, 6, 1, 0.5) 52%,
            rgba(10, 6, 1, 0.3) 77%);
}

.experience-card__title {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    color: var(--cor-branca);
}

@media (max-width: 767px) {
    .experience__title {
        font-size: 36px;
    }

    .experience__grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .experience-card {
        min-height: 230px;
    }

    .experience-card--tall {
        grid-row: auto;
        min-height: 300px;
    }

    .experience-card__title {
        font-size: 26px;
    }
}

/* =========================================
   Especialidades
========================================= */
.specialties {
    max-width: 1200px;
    margin: 120px auto 0;
    padding: 0 24px;
    text-align: center;
    /* Alvo de âncora vindo do rodapé; a folga evita que o header cubra o título. */
    scroll-margin-top: 120px;
}

.specialties__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.3;
}

.specialties__swiper {
    margin-top: 40px;
}

/* Acima de 767px o Swiper não é inicializado: o wrapper vira uma grade comum. */
@media (min-width: 768px) {
    .specialties__swiper .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }

    .specialties__swiper .swiper-pagination {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .specialties__swiper .swiper-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* No mobile os cards viram slides e precisam esticar até a altura do mais alto. */
@media (max-width: 767px) {
    .specialties__swiper .swiper-slide {
        height: auto;
    }
}

.specialty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(206deg, rgb(255, 245, 239) 38%, rgb(255, 255, 255) 100%);
    border: 1px solid var(--bg-branco);
    border-radius: 16px;
    filter: drop-shadow(0px 0px 30px rgba(58, 49, 45, 0.02));
    transition: transform 0.25s ease;
}

.specialty-card:hover {
    transform: translateY(-4px);
}

.specialty-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 7.285px;
    background: linear-gradient(225deg, rgba(255, 245, 241, 0.55) 0%, rgba(245, 225, 213, 0.55) 100%);
    backdrop-filter: blur(4.553px);
}

.specialty-card__icon img {
    width: 43px;
    height: 43px;
}

.specialty-card__name {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    color: var(--cor-secundaria);
}

@media (max-width: 767px) {
    .specialties {
        margin-top: 100px;
    }

    .specialties__title {
        font-size: 36px;
    }

    .specialty-card__name {
        font-size: 16px;
    }
}

/* =========================================
   CEO e Fundador do Instituto Rauen
   (mesmo fundo da seção de contato da home)
========================================= */
.founder {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-branco);
    border-top: 1px solid var(--borda-tan);
    margin-top: 120px;
    padding: 100px 24px;
    display: flex;
    justify-content: center;
}

.founder__deco {
    position: absolute;
    top: 1%;
    left: -7%;
    width: 90%;
    max-width: none;
    height: 140%;
    transform: rotate(-24.3deg);
    pointer-events: none;
    z-index: 0;
}

.founder__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.founder__mini {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.founder__mini-photo {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: cover;
}

.founder__mini-name {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 18px;
    line-height: 1.4;
    color: var(--cor-secundaria);
}

.founder__mini-handle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.4;
    color: var(--cor-secundaria);
}

.founder__mini-handle img {
    width: 18px;
    height: 18px;
}

.founder__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.3;
    max-width: 800px;
    width: 100%;
}

.founder__desc {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 24px;
    line-height: 1.4;
    max-width: 779px;
    width: 100%;
}

.founder .btn-gradient {
    margin-top: 20px;
}

@media (max-width: 767px) {
    .founder {
        margin-top: 100px;
        padding: 70px 24px;
    }

    .founder__title {
        font-size: 32px;
    }

    .founder__desc {
        font-size: 18px;
    }
}
