/* Estilo automático para a página: home */

/* ==========================================================================
   HERO – Estilo Nova Rota (slider split-layout)
   ========================================================================== */

.nr-hero {
    position: relative;
    overflow: hidden;
    background: #FAFCFB;
    /* padding-top: 100px; */
}

.nr-hero__list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    width: 100%;
    height: calc(100vh - 160px);
    min-height: 580px;
}

/* cada slide empilhado via position absolute */
.nr-hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* texto e imagem invisíveis por padrão */
.nr-hero__slide .nr-hero__title,
.nr-hero__slide .nr-hero__editor {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.nr-hero__media {
    position: absolute;
    top: 0;
    left: calc(50% + 12px);
    width: calc(50vw - 12px);
    height: 100%;
    overflow: hidden;
}

.nr-hero__media img,
.nr-hero__media video,
.nr-hero__media picture {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.nr-hero__media picture img {
    opacity: 1;
    transform: none;
    transition: none;
}

/* slide visível: texto e imagem aparecem */
.nr-hero__slide--visible {
    z-index: 2;
}

.nr-hero__slide--visible .nr-hero__title,
.nr-hero__slide--visible .nr-hero__editor {
    opacity: 1;
}

.nr-hero__slide--visible .nr-hero__media img,
.nr-hero__slide--visible .nr-hero__media video {
    opacity: 1;
    transform: translateX(0);
}

.nr-hero__slide--visible .nr-hero__media picture img {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* slide entrando (animating) fica acima de tudo */
.nr-hero__slide--animating {
    z-index: 3;
}

@keyframes nr-hero-text-enter {
    from { opacity: 0; transform: translateX(-2rem); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes nr-hero-image-enter {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

.nr-hero__slide--animating .nr-hero__title {
    animation: nr-hero-text-enter 0.6s ease forwards 0.2s;
}

.nr-hero__slide--animating .nr-hero__editor {
    animation: nr-hero-text-enter 0.6s ease forwards 0.4s;
}

.nr-hero__slide--animating .nr-hero__media img,
.nr-hero__slide--animating .nr-hero__media video {
    animation: nr-hero-image-enter 0.6s ease forwards;
}

.nr-hero__slide--animating .nr-hero__media picture img {
    animation: nr-hero-image-enter 0.6s ease forwards;
}

/* conteúdo de texto à esquerda */
.nr-hero__container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

.nr-hero__text {
    width: 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nr-hero__title {
    font-size: 48px;
    font-weight: 700;
    color: #1E3D28;
    margin-bottom: 24px;
    line-height: 1.1;
}

.nr-hero__title span {
    /* color: #35A85A; */
}

.nr-hero__editor {
    font-size: 16px;
    color: #1E3D28;
    line-height: 1.48;
    letter-spacing: 0.01em;
    margin-bottom: 40px;
}

.nr-hero__cta {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: #35A85A;
    color: #FAFCFB;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    width: fit-content;
    transition: background 0.3s ease;
}

.nr-hero__cta:hover {
    background: #1E3D28;
    color: #FAFCFB;
}

/* paginação do hero */
.nr-hero__pagination-wrap {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    z-index: 4;
    pointer-events: none;
}

.nr-hero__pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.nr-hero__prev,
.nr-hero__next {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #FAFCFB;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1E3D28;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nr-hero__prev:hover,
.nr-hero__next:hover {
    transform: scale(1.08);
}

.nr-hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1E3D28;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
}

.nr-hero__dot--active {
    width: 16px;
    border-radius: 8px;
    background: #72B838;
}

/* ==========================================================================
   PLANOS – Estilo Nova Rota
   ========================================================================== */

.nr-plans {
    position: relative;
    overflow: hidden;
}

.nr-plans__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 120px);
    background: linear-gradient(90deg, #3E6528 0%, #345320 50%, #1F3412 100%);
    z-index: 1;
    overflow: hidden;
}

.nr-plans__lines {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    bottom: -20px;
    background: url('/wp-content/themes/rotaagro/assets/img/lines-bg.svg');
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: right center;
}

.nr-plans__container {
    position: relative;
    z-index: 2;
}

.nr-plans__texts {
    padding: 80px 0 48px;
    display: flex;
    align-items: flex-end;
    gap: 32px;
}

.nr-plans__title {
    font-size: 32px;
    font-weight: 700;
    color: #FAFCFB;
    flex: 0 0 41.6666%;
    margin: 0;
    padding-right: 24px;
}

.nr-plans__intro {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #FAFCFB;
    line-height: 1.48;
    letter-spacing: 0.01em;
}

.nr-plans__options {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 50px;
}

.nr-plans__card-wrap {
    flex: 1 1 0;
    display: flex;
}

.nr-plans__card {
    width: 100%;
    border: 1px solid #D2D2D2;
    padding: 32px;
    background: #FFFFFF;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.6s ease;
}

.nr-plans__card:hover {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.18);
}

.nr-plans__card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid #D2D2D2;
}

.nr-plans__badge {
    font-size: 15px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 4px;
    background: #E6ECE7;
    color: #1E3D28;
    letter-spacing: 0.01em;
    display: inline-block;
    margin-bottom: 0;
}

.nr-plans__range {
    font-size: 48px;
    font-weight: 700;
    color: #1E3D28;
    text-align: center;
    width: 100%;
    padding-top: 24px;
    line-height: 1.2;
}

.nr-plans__vidas-label {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    text-transform: uppercase;
    color: #35A85A;
    margin-top: 4px;
}

.nr-plans__card-body {
    padding: 32px 0 40px;
    flex-grow: 1;
    font-size: 14px;
    font-weight: 400;
    color: #464646;
    line-height: 1.6;
}

.nr-plans__card-body p {
    margin: 0;
}

/* lista de funcionalidades dos cards de planos */
.nr-plans__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nr-plans__feature {
    padding-left: 14px;
    border-left: 3px solid #35A85A;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nr-plans__feature-title {
    font-size: 14px;
    font-weight: 700;
    color: #1E3D28;
    line-height: 1.3;
}

.nr-plans__feature-desc {
    font-size: 13px;
    font-weight: 400;
    color: #464646;
    line-height: 1.5;
    margin: 0;
}

/* subitens do Comitê de Saúde (Master) */
.nr-plans__feature-sub {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nr-plans__feature-sub li strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1E3D28;
    line-height: 1.3;
}

.nr-plans__feature-sub li p {
    font-size: 13px;
    font-weight: 400;
    color: #464646;
    line-height: 1.5;
    margin: 3px 0 0;
}

.nr-plans__cta {
    display: block;
    border: 1px solid #1E3D28;
    padding: 10px 32px;
    border-radius: 4px;
    background: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    color: #1E3D28;
    text-align: center;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.nr-plans__cta:hover {
    background: #1E3D28;
    color: #FAFCFB;
}

/* ==========================================================================
   MARQUEE – Logos de parceiros/operadoras
   ========================================================================== */

.nr-marquee {
    overflow: hidden;
    padding: 44px 0;
    background: #F6FAF4;
    border-top: 1px solid #E2EBE0;
    border-bottom: 1px solid #E2EBE0;
}

.nr-marquee__track {
    display: flex;
    width: max-content;
    animation: nr-marquee-scroll 15s linear infinite;
}

.nr-marquee:hover .nr-marquee__track {
    animation-play-state: paused;
}

.nr-marquee__content {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 0 32px;
}

.nr-marquee__content img {
    height: 44px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.nr-marquee__content img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes nr-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-25%); }
}

@media (prefers-reduced-motion: reduce) {
    .nr-marquee__track {
        animation: none;
    }
}

/* ==========================================================================
   Media queries – hero e planos
   ========================================================================== */

@media (max-width: 960px) {
    .nr-hero__list {
        height: auto;
        min-height: auto;
    }

    /* slides ocultos no mobile por padrão */
    .nr-hero__slide {
        display: none;
        padding-bottom: 0;
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }

    /* slide visível fica no fluxo normal para definir a altura da seção */
    .nr-hero__slide--visible {
        display: flex;
        position: relative;
        height: auto;
    }

    /* slide animando sobrepõe o visível durante a transição */
    .nr-hero__slide--animating {
        display: flex;
        height: 100%;
    }

    .nr-hero__container {
        height: auto;
    }

    .nr-hero__slide .nr-hero__title {
        margin-top: 48px;
    }

    .nr-hero__slide .nr-hero__editor {
        margin-bottom: 40px;
    }

    .nr-hero__text {
        width: 100%;
    }

    /* mídia flui abaixo do texto */
    .nr-hero__media {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        height: 75vw;
    }

    /* paginação abaixo da mídia */
    .nr-hero__pagination-wrap {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 24px 0;
    }

    .nr-hero__pagination {
        justify-content: center;
    }

    .nr-hero__prev,
    .nr-hero__next {
        display: none;
    }

    .nr-plans__texts {
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 0 40px;
        gap: 16px;
    }

    .nr-plans__title {
        flex: none;
        padding-right: 0;
    }

    .nr-plans__options {
        flex-wrap: wrap;
        margin-bottom: 80px;
    }

    .nr-plans__card-wrap {
        flex: 0 0 100%;
    }
}

@media (max-width: 768px) {
    .nr-hero__title {
        font-size: 36px;
    }

    .nr-plans__range {
        font-size: 40px;
    }
}


.hero-section#home {
    overflow: hidden;
    /* padding-top: 98px; */
    position: relative;
    min-height: 72svh;
    /* padding-top: 100px; */

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        right: 0;
        filter: brightness(0.8);
    }

    .hero-content {
        position: absolute;
        top: 0;
        width: 100%;
        /* background-color: #2C267B; */
        z-index: 2;
        pointer-events: none;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

        h1,
        p {
            /* color: #0b0b0b; */
            font-size: 20px;
        }

        a {
            pointer-events: auto;
        }

        h1 {
            font-size: 46px;
            line-height: 60px;
            font-weight: 500;
            /* margin-bottom: 16px; */

            span {
                color: #72B838;
            }
        }
    }

    &::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        background: linear-gradient(120deg, #121212 10%, rgba(0, 0, 0, 0) 100%);
        z-index: 1;
        /* clip-path: polygon(0 0, 75% 0, 100% 100%, 0% 100%); */
    }
}

section.sobre {
    padding-top: 70px;
    padding-bottom: 70px;
    background-color: #FAFCFB;
    border-bottom: 1px solid rgba(102, 102, 102, 0.12);

    .img-sobre {
        width: 100%;
        border-radius: 8px;
        max-height: 380px;
        object-fit: cover;
    }

    .sobre__heading {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .sobre__eyebrow {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: #35A85A;
    }

    h2 {
        font-size: 32px;
        font-weight: 700;
        color: #1E3D28;
        line-height: 1.2;
        margin: 0;
    }

    p {
        margin: 0;
        color: #5A6B62;
        font-size: 15px;
        line-height: 1.6;
    }

    a.cta {
        width: fit-content;
    }

    .card {
        padding: 28px 32px;
        border-radius: 8px;
        background-color: #FFFFFF;
        border: 1px solid #E4EDE0;
        border-left: 4px solid #35A85A;

        .sobre__num {
            font-size: 28px;
            font-weight: 700;
            color: #35A85A;
            flex-shrink: 0;
            min-width: 36px;
            line-height: 1;
        }

        h3 {
            font-size: 17px;
            font-weight: 600;
            color: #1E3D28;
            margin-bottom: 6px;
        }

        p {
            font-size: 14px;
            font-weight: 400;
            color: #5A6B62;
            margin: 0;
            line-height: 1.55;
        }
    }
}

section.servicos {
    .container {
        background-color: #F4FBF7;
    }

    .grid-seguros {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        ;
        gap: 2rem 2rem;
        align-items: start;
        padding: 60px 45px;
    }

    .grid-seguros .intro {
        grid-column: 1 / 2;
    }

    .grid-seguros .card-seguro {
        background: rgb(233, 233, 233, 0.5);
        border-radius: 10px;
        padding: 2rem;
        height: 100%;
    }

    .grid-seguros a {
        display: inline-block;
        margin-top: 1rem;
        font-weight: 600;
        color: #35A85A;
        text-decoration: none;
    }

    .grid-seguros a::before {
        content: "• ";
        color: #35A85A;
    }
}

section.blog {
    margin: 60px 0;

    .tag {
        font-size: 16px;
        font-weight: 600;
        background-color: #936037;
        border-radius: 40px;
        width: fit-content;
        color: #fff;
        padding: 2px 10px;
    }

    img {
        width: 100%;
        border-radius: 6px;
        max-height: 34svh;
        object-fit: cover;
    }

    .post {
        color: #1C1C1C;
        display: block;
        transition: 0.3s all ease-in-out;
        padding: 32px;
        border-radius: 4px;

        &:hover {
            background-color: #F4FBF7;
        }

        a.mt-auto {
            color: #35A85A;
        }
    }
}

@media (min-width: 1200px) {
    section.servicos {
        .grid-seguros {
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        }
    }
}

@media (max-width: 992px) {
    .hero-section#home {
        .hero-content {
            height: 100%;
            top: 0;
            padding: 40px 0;

            h1 {
                font-size: 36px;
                line-height: 50px;
            }
        }
    }

    section.servicos {
        .grid-seguros {
            padding: 60px 0;
        }
    }

    section.blog {
        post {
            padding: 0;
        }
    }
}

@media (max-width: 768px) {
    .hero-section#home {
        min-height: 60svh;

        .hero-content {
            height: 100%;
            top: 0;
            padding: 40px 0;

            h1, p {
                color: #f5f5f5;
            }
        }
    }

    section.servicos {
        .grid-seguros {
            padding: 60px 0;
        }
    }

    section.blog {
        post {
            padding: 0;
        }
    }
}