/* ============================================================
   Na Mídia — Saiu na Mídia
   Prefix: nm-
   Breakpoints:
     Desktop grande  : base
     MacBook Air M2  : @media (max-width: 1700px)
     Mobile          : @media (max-width: 768px)
   ============================================================ */

/* ---- Breadcrumb ------------------------------------------ */
.nm-breadcrumb {
    padding: 10px 0 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    color: #999;
}

.nm-breadcrumb a {
    color: #999;
    text-decoration: none;
}

.nm-breadcrumb__current {
    color: #333;
    font-weight: 700;
}

/* ---- Hero ------------------------------------------------- */
.nm-hero {
    position: relative;
    width: 100%;
    height: 310px;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    box-sizing: border-box;
}

.nm-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.nm-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    display: block;
}

.nm-hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.54) 100%);
    z-index: 1;
    border-radius: 24px;
}

.nm-hero__content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    direction: ltr;
    text-align: left;
}

.nm-hero__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 36px;
    color: #fff;
    margin: 0;
    line-height: normal;
    white-space: nowrap;
}

.nm-hero__subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #fff;
    margin: 0;
    line-height: 26px;
    white-space: nowrap;
}

/* ---- Articles grid --------------------------------------- */
.nm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 50px;
    padding-bottom: 15px;
}

/* ---- Card ------------------------------------------------ */
.nm-card {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
    text-decoration: none;
    background: #fff;
    transition: box-shadow 0.2s;
}

.nm-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nm-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px 24px 0 24px;
    overflow: hidden;
    flex-shrink: 0;
}

.nm-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nm-card__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 0 20px 20px;
    direction: ltr;
    text-align: left;
}

.nm-card__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.nm-card__date {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #999;
    line-height: 1.2;
}

.nm-card__source {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #7eb339;
    line-height: 1.25;
}

.nm-card__title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #000;
    line-height: normal;
    margin: 0;
}

.nm-card__actions {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nm-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 5px 20px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    line-height: 22px;
    transition: opacity 0.2s;
}

.nm-card__btn:hover {
    opacity: 0.85;
}

.nm-card__btn--noticia {
    background: #7eb339;
    color: #fff;
    border: none;
}

.nm-card__btn--estudo {
    background: transparent;
    color: #e37504;
    border: 1px solid #e37504;
}

.nm-card__btn--pesquisa {
    background: transparent;
    color: #008f8c;
    border: 1px solid #008f8c;
}

/* ---- Pagination ------------------------------------------ */
.nm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 35px 0 30px;
}

.nm-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #b0b4b3;
    border-radius: 3px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #666;
    text-decoration: none;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.nm-pagination__item--active {
    background: #fd8204;
    border-color: #fd8204;
    color: #fff;
}

.nm-pagination__item:hover:not(.nm-pagination__item--active) {
    background: #f5f5f5;
}

/* ---- Newsletter ------------------------------------------ */
.nm-newsletter-section {
    padding: 50px 0 60px;
}

.nm-newsletter {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #ccc;
    max-width: 1140px;
    margin: 0 auto;
}

.nm-newsletter__image {
    width: 500px;
    flex-shrink: 0;
}

.nm-newsletter__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nm-newsletter__form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 31px 30px;
    background: #fff;
}

.nm-newsletter__inner {
    width: 100%;
    max-width: 562px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.nm-newsletter__desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 19px;
    color: #333;
    line-height: 1.2;
    margin: 0;
    width: 100%;
}

.nm-newsletter__input {
    width: 100%;
    height: 46px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0 17px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
}

.nm-newsletter__input::placeholder {
    color: #777;
}

.nm-newsletter__btn {
    width: 100%;
    height: 46px;
    background: #7eb339;
    border: none;
    border-radius: 45px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    text-transform: capitalize;
    cursor: pointer;
    transition: opacity 0.2s;
}

.nm-newsletter__btn:hover {
    opacity: 0.88;
}

/* ---- MacBook Air M2 (@media max-width: 1700px) ----------- */
@media (max-width: 1700px) {
    .nm-hero__title {
        font-size: 30px;
    }

    .nm-hero__subtitle {
        font-size: 16px;
    }

    .nm-card__title {
        font-size: 18px;
    }

    .nm-card__btn {
        font-size: 14px;
        padding: 5px 16px;
        height: 42px;
    }

    .nm-newsletter__image {
        width: 400px;
    }

    .nm-newsletter__desc {
        font-size: 17px;
    }
}

/* ---- Mobile (@media max-width: 768px) ------------------- */
@media (max-width: 768px) {
    .nm-hero {
        height: 220px;
        padding: 20px;
    }

    .nm-hero__title {
        font-size: 24px;
        white-space: normal;
    }

    .nm-hero__subtitle {
        font-size: 14px;
        line-height: 1.4;
        white-space: normal;
    }

    .nm-grid {
        grid-template-columns: 1fr;
        padding-top: 30px;
        gap: 16px;
    }

    .nm-card__title {
        font-size: 17px;
    }

    .nm-card__btn {
        font-size: 14px;
        padding: 5px 14px;
        height: 40px;
    }

    .nm-newsletter {
        flex-direction: column;
    }

    .nm-newsletter__image {
        width: 100%;
        height: 200px;
    }

    .nm-newsletter__form {
        padding: 24px 20px;
    }

    .nm-newsletter__desc {
        font-size: 15px;
    }

    .nm-pagination {
        gap: 4px;
    }
}
