.resources-page {
    width: min(calc(100% - 40px), 1220px);
    margin-inline: auto;
    padding: 18px 0 76px;
}

.resources-hero {
    padding: 2px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.resources-hero__content { max-width: 900px; }
.resources-hero h1 { max-width: 760px; margin: 0 0 4px; font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -.035em; }
.resources-hero__content > p { max-width: 780px; margin: 0; color: var(--color-muted); font-size: clamp(.82rem, 1vw, .93rem); line-height: 1.45; }

.resources-library, .creator-catalog { margin-top: clamp(20px, 2.8vw, 30px); }
.resources-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.resources-section-heading h2 { margin: 5px 0 0; font-size: clamp(1.55rem, 2.8vw, 2.05rem); letter-spacing: -.035em; }
.resources-section-heading > p { max-width: 450px; margin: 0 0 2px; color: var(--color-muted); font-size: .9rem; line-height: 1.5; }
.resources-library-grid { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.65fr); gap: 16px; align-items: stretch; }

.resource-feature, .teacher-tools, .creator-catalog { min-width: 0; border: 1px solid var(--color-line); border-radius: var(--radius-medium); background: var(--color-surface); box-shadow: 0 8px 24px rgba(35,76,135,.06); }
.resource-feature { display: flex; flex-direction: column; overflow: hidden; border-top: 4px solid var(--color-teal); }
.resource-feature__image { display: grid; min-height: 142px; place-items: center; overflow: hidden; background: linear-gradient(145deg, rgba(50,182,164,.1), rgba(53,103,232,.09)); }
.resource-feature__image img { width: 100%; height: 142px; object-fit: contain; }
.resource-feature__body { display: flex; flex: 1; flex-direction: column; padding: 17px 18px 18px; }
.resource-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.resource-kicker { margin: 0 0 4px; color: var(--color-primary); font-size: .68rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.resource-title-row h3, .teacher-tools__heading h3 { margin: 0; font-size: 1.16rem; }
.resource-feature__body > p { margin: 10px 0 16px; color: var(--color-muted); font-size: .86rem; line-height: 1.5; }
.resource-pill { display: inline-flex; align-items: center; flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.resource-pill--free { background: rgba(50,182,164,.13); color: #137565; }
[data-theme="dark"] .resource-pill--free { color: #86e0cd; }
.resource-action { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; align-self: flex-start; margin-top: auto; padding: 9px 13px; border-radius: 10px; font-size: .83rem; font-weight: 850; text-decoration: none; transition: background .18s ease, transform .18s ease; }
.resource-action:hover, .resource-action:focus-visible { transform: translateY(-1px); }
.resource-action--primary { background: var(--color-accent); color: #1f2a3b; }
.resource-action--primary:hover, .resource-action--primary:focus-visible { background: #f2be66; color: #1f2a3b; }

.teacher-tools { padding: 17px; border-top: 4px solid var(--color-primary); }
.teacher-tools__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.teacher-tools__heading > a { color: var(--color-primary); font-size: .78rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.teacher-tools__heading > a:hover, .teacher-tools__heading > a:focus-visible, .creator-catalog-empty a:hover, .creator-catalog-empty a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.teacher-tools__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.teacher-tool { display: flex; min-width: 0; min-height: 84px; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--color-line); border-radius: 12px; background: var(--color-page); color: var(--color-ink); text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.teacher-tool:hover, .teacher-tool:focus-visible { transform: translateY(-1px); border-color: var(--color-primary); box-shadow: 0 7px 18px rgba(35,76,135,.1); }
.teacher-tool__visual { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; overflow: hidden; border-radius: 11px; background: rgba(53,103,232,.09); }
.teacher-tool__visual img { width: 100%; height: 100%; object-fit: contain; }
.teacher-tool__visual--word { background: rgba(42,104,196,.08); }
.teacher-tool__visual--excel { background: rgba(31,137,92,.09); }
.teacher-tool__visual--plans { color: var(--color-primary); font-size: 1.35rem; }
.teacher-tool__text { display: grid; min-width: 0; gap: 2px; }
.teacher-tool__text strong { font-size: .87rem; line-height: 1.25; }
.teacher-tool__text > span { color: var(--color-muted); font-size: .72rem; line-height: 1.35; }
.teacher-tool__text small { color: var(--color-primary); font-size: .64rem; font-weight: 800; line-height: 1.3; }
.teacher-tool__arrow { flex: 0 0 auto; margin-left: auto; color: var(--color-primary); font-size: .85rem; }
.teacher-tools__note { display: flex; align-items: flex-start; gap: 7px; margin: 12px 1px 0; color: var(--color-muted); font-size: .72rem; line-height: 1.45; }
.teacher-tools__note i { flex: 0 0 auto; margin-top: 1px; color: var(--color-primary); }

.creator-catalog { overflow: hidden; padding: clamp(16px, 2.6vw, 26px); border-top: 4px solid var(--color-accent); }
.creator-catalog__marketplace { margin-top: 1rem; }
.resources-section-heading--catalog { margin-bottom: 17px; }
.creator-catalog-empty { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 16px; padding: clamp(17px, 3vw, 26px); border: 1px dashed var(--color-line); border-radius: 14px; background: linear-gradient(110deg, rgba(53,103,232,.055), transparent 72%); }
.creator-catalog-empty__icon { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 15px; background: rgba(53,103,232,.11); color: var(--color-primary); font-size: 1.4rem; }
.creator-catalog-empty h3 { margin: 0 0 5px; font-size: 1.05rem; }
.creator-catalog-empty p:not(.resource-kicker) { max-width: 720px; margin: 0; color: var(--color-muted); font-size: .86rem; line-height: 1.5; }
.creator-catalog-empty a { display: inline-flex; align-items: center; gap: 7px; margin-top: 11px; color: var(--color-primary); font-size: .8rem; font-weight: 850; text-decoration: none; }
[data-theme="dark"] .resource-feature, [data-theme="dark"] .teacher-tools, [data-theme="dark"] .creator-catalog { box-shadow: 0 8px 24px rgba(0,0,0,.16); }
[data-theme="dark"] .teacher-tool { background: var(--color-surface-soft); }
[data-theme="dark"] .creator-catalog-empty { background: linear-gradient(110deg, rgba(91,133,235,.1), transparent 72%); }

/* Estrutura reutilizável para cartões de produtos reais quando o catálogo for ligado. */
.resources-product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.resources-product-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--color-line); border-radius: 14px; background: var(--color-page); color: var(--color-ink); }
.resources-product-card__thumbnail { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-surface-soft); }
.resources-product-card__thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.resources-product-card__body { display: flex; flex: 1; flex-direction: column; gap: 9px; padding: 14px; }
.resources-product-card h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.resources-product-card__creator, .resources-product-card__description { margin: 0; color: var(--color-muted); font-size: .8rem; line-height: 1.45; }
.resources-product-card__metadata { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--color-muted); font-size: .72rem; }
.resources-product-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--color-line); }
.resources-product-card__price { font-size: 1rem; font-weight: 900; }
.resources-product-card__rating:empty { display: none; }
.resources-product-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (min-width: 1281px) and (max-width: 1400px) {
    body:has(.resources-page) .site-header__inner .site-search { width: 240px; flex: 0 1 240px; }
}

@media (max-width: 900px) {
    .resources-library-grid { grid-template-columns: minmax(230px, .72fr) minmax(0, 1.5fr); }
    .resources-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .teacher-tools { padding: 14px; }
    .teacher-tool { gap: 8px; padding: 9px; }
    .teacher-tool__visual { width: 42px; height: 42px; flex-basis: 42px; }
}

@media (max-width: 720px) {
    .resources-page { width: min(calc(100% - 30px), 620px); padding-top: 14px; }
    .resources-hero h1 { font-size: clamp(1.35rem, 5vw, 1.7rem); }
    .resources-section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
    .resources-section-heading > p { max-width: 580px; }
    .resources-library-grid { grid-template-columns: 1fr; }
    .resource-feature { display: grid; grid-template-columns: minmax(145px, .7fr) minmax(0, 1.3fr); }
    .resource-feature__image, .resource-feature__image img { height: 100%; min-height: 190px; }
}

@media (max-width: 520px) {
    .resources-page { width: calc(100% - 24px); padding-bottom: 48px; }
    .resources-hero { padding-top: 0; }
    .resources-hero__content > p { font-size: .84rem; }
    .resources-section-heading h2 { font-size: 1.55rem; }
    .resource-feature { grid-template-columns: 1fr; }
    .resource-feature__image, .resource-feature__image img { height: 132px; min-height: 132px; }
    .teacher-tools__heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .teacher-tools__grid { grid-template-columns: 1fr; }
    .teacher-tool { min-height: 74px; }
    .creator-catalog-empty { grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 15px 12px; }
    .creator-catalog-empty__icon { width: 42px; height: 42px; border-radius: 12px; }
    .resources-product-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .resource-action, .teacher-tool { transition: none; }
    .resource-action:hover, .resource-action:focus-visible, .teacher-tool:hover, .teacher-tool:focus-visible { transform: none; }
}
