/* =========================================================
   Ele Estofa — Blog (listagem e artigo)
   Estilo editorial: títulos serifados, coluna de leitura estreita,
   índice fixo e grelha de revista.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root { --eb-serif: 'Playfair Display', Georgia, 'Times New Roman', serif; --eb-accent: #b8322a; }

.eb-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--eb-accent); }
.eb-eyebrow a { color: inherit; }
.eb-meta { font-size: 13px; color: #8a8a8a; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.eb-meta span + span::before { content: '·'; margin-right: 14px; color: #c5c5c5; }

/* ---------- Capa (artigo em destaque) ---------- */
.eb-cover { position: relative; min-height: 88vh; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #1c1c1c; }
.eb-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 8s ease-out; }
.eb-cover:hover > img { transform: scale(1.06); }
.eb-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.15) 30%, rgba(0,0,0,.8) 100%), linear-gradient(90deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 65%); }
.eb-cover h1, .eb-cover p { text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.eb-cover .container { position: relative; z-index: 2; padding-top: calc(var(--ee-header-h) + 40px); padding-bottom: 70px; }
.eb-cover-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.eb-cover-kicker .eb-tag { background: #fff; color: #1c1c1c; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; padding: 6px 10px; }
.eb-cover-kicker .eb-eyebrow { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.eb-cover h1 { font-family: var(--eb-serif); font-weight: 500; font-size: clamp(34px, 5.4vw, 68px); line-height: 1.08; color: #fff; max-width: 900px; margin-bottom: 18px; letter-spacing: -.5px; }
.eb-cover h1 a { color: #fff; }
.eb-cover p { font-size: 18px; line-height: 1.65; color: #e9e9e9; max-width: 640px; margin-bottom: 24px; }
.eb-cover .eb-meta { color: #d4d4d4; margin-bottom: 30px; }
.eb-cover .eb-meta span + span::before { color: #9a9a9a; }

/* Cabeçalho simples quando não há artigos */
.eb-page-head { padding: 70px 0 30px; text-align: center; }
.eb-page-head h1 { font-family: var(--eb-serif); font-weight: 500; font-size: clamp(36px, 5vw, 60px); margin-bottom: 10px; }
.eb-page-head p { color: #777; font-size: 17px; }

/* ---------- Barra de categorias e pesquisa ---------- */
.eb-nav { position: sticky; top: var(--ee-header-h); z-index: 20; background: #fff; border-bottom: 1px solid var(--ee-line); }
.eb-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eb-tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.eb-tabs::-webkit-scrollbar { display: none; }
.eb-tabs a { white-space: nowrap; padding: 20px 0 18px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #777; border-bottom: 2px solid transparent; }
.eb-tabs a:hover { color: #1c1c1c; }
.eb-tabs a.ativo { color: #1c1c1c; border-color: #1c1c1c; }
.eb-search { position: relative; flex: 0 0 260px; }
.eb-search input { width: 100%; border: none; border-bottom: 1px solid #cfcfcf; padding: 10px 30px 8px 0; font-size: 14px; background: transparent; }
.eb-search input:focus { outline: none; border-color: #1c1c1c; }
.eb-search button { position: absolute; right: 0; top: 50%; transform: translateY(-50%); border: none; background: none; color: #555; }

/* ---------- Grelha de artigos ---------- */
.eb-section { padding: 70px 0 90px; }
.eb-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-bottom: 1px solid #1c1c1c; padding-bottom: 12px; margin-bottom: 40px; }
.eb-section-title h2 { font-family: var(--eb-serif); font-weight: 500; font-size: 30px; margin: 0; }
.eb-section-title span { font-size: 13px; color: #8a8a8a; }
.eb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 36px; }
.eb-card { display: flex; flex-direction: column; }
.eb-card-img { display: block; overflow: hidden; margin-bottom: 20px; background: #f2f2f2; }
.eb-card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; transition: transform .7s ease; }
.eb-card:hover .eb-card-img img { transform: scale(1.04); }
.eb-card .eb-eyebrow { margin-bottom: 10px; }
.eb-card h3 { font-family: var(--eb-serif); font-weight: 500; font-size: 24px; line-height: 1.25; margin-bottom: 12px; }
.eb-card h3 a { color: #1c1c1c; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .35s ease; }
.eb-card:hover h3 a { background-size: 100% 1px; }
.eb-card p { color: #666; font-size: 15px; line-height: 1.65; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* Primeiro cartão em destaque na grelha (estilo revista) */
.eb-grid .eb-card-lg { grid-column: span 2; display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; align-items: center; }
.eb-grid .eb-card-lg .eb-card-img { margin: 0; }
.eb-grid .eb-card-lg .eb-card-img img { aspect-ratio: 4 / 3; }
.eb-grid .eb-card-lg h3 { font-size: 32px; }
.eb-empty { grid-column: 1 / -1; text-align: center; padding: 60px 0; }
.eb-empty h3 { font-family: var(--eb-serif); font-weight: 500; font-size: 28px; }
.eb-empty p { color: #777; }

.eb-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 60px; list-style: none; padding: 0; }
.eb-pagination a { display: block; min-width: 42px; padding: 10px 14px; border: 1px solid #ddd; text-align: center; font-size: 14px; color: #333; }
.eb-pagination a.ativo, .eb-pagination a:hover { background: #1c1c1c; color: #fff; border-color: #1c1c1c; }

/* ---------- Artigo ---------- */
.eb-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--eb-accent); z-index: 1001; transition: width .1s linear; }
.eb-article-head { padding: 60px 0 40px; }
.eb-crumbs { font-size: 13px; color: #8a8a8a; margin-bottom: 26px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.eb-crumbs a { color: #555; }
.eb-crumbs a:hover { color: #1c1c1c; text-decoration: underline; }
.eb-crumbs i { font-size: 10px; }
.eb-article-head .eb-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.eb-article-head h1 { font-family: var(--eb-serif); font-weight: 500; font-size: clamp(32px, 4.6vw, 56px); line-height: 1.12; letter-spacing: -.4px; margin: 14px 0 20px; }
.eb-dek { font-size: 20px; line-height: 1.6; color: #5f5f5f; max-width: 720px; margin: 0 auto 28px; }
.eb-byline { display: inline-flex; align-items: center; gap: 14px; text-align: left; }
.eb-byline img { width: 46px; height: 46px; border-radius: 50% !important; background: #f2f2f2; padding: 8px; object-fit: contain; }
.eb-byline strong { display: block; font-size: 15px; color: #1c1c1c; }
.eb-hero-img { margin: 0 auto; max-width: 1240px; }
.eb-hero-img img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block; }
.eb-hero-img figcaption { font-size: 12px; color: #9a9a9a; padding: 10px 0 0; text-align: right; }

.eb-layout { display: grid; grid-template-columns: 70px minmax(0, 720px) 280px; gap: 60px; justify-content: center; padding: 60px 0 40px; }
.eb-share-side { position: sticky; top: calc(var(--ee-header-h) + 40px); align-self: start; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.eb-share-side span { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #9a9a9a; writing-mode: vertical-rl; transform: rotate(180deg); margin-bottom: 8px; }
.eb-share-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #ddd; display: inline-flex; align-items: center; justify-content: center; color: #333; font-size: 16px; transition: all .2s ease; background: #fff; cursor: pointer; }
.eb-share-btn:hover { background: #1c1c1c; color: #fff; border-color: #1c1c1c; }

/* Tipografia do texto */
.eb-content { font-size: 19px; line-height: 1.85; color: #2b2b2b; }
.eb-content > *:first-child { margin-top: 0; }
.eb-content p { margin: 0 0 1.4em; font-size: inherit; line-height: inherit; color: inherit; }
.eb-content > p:first-of-type::first-letter { font-family: var(--eb-serif); float: left; font-size: 4.1em; line-height: .85; padding: 8px 12px 0 0; color: #1c1c1c; }
.eb-content h2, .eb-content h3, .eb-content h4 { font-family: var(--eb-serif); font-weight: 500; color: #1c1c1c; line-height: 1.3; scroll-margin-top: calc(var(--ee-header-h) + 30px); }
.eb-content h2 { font-size: 34px; margin: 1.8em 0 .6em; }
.eb-content h3 { font-size: 27px; margin: 1.6em 0 .55em; }
.eb-content h4 { font-size: 22px; margin: 1.4em 0 .5em; }
.eb-content ul, .eb-content ol { margin: 0 0 1.6em; padding-left: 0; list-style: none; }
.eb-content ul li, .eb-content ol li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.eb-content ul li::before { content: ''; position: absolute; left: 6px; top: .78em; width: 8px; height: 8px; background: var(--eb-accent); }
.eb-content ol { counter-reset: eb; }
.eb-content ol li { counter-increment: eb; }
.eb-content ol li::before { content: counter(eb) '.'; position: absolute; left: 0; font-weight: 700; color: var(--eb-accent); }
.eb-content li p { margin: 0; }
.eb-content b, .eb-content strong { color: #1c1c1c; font-weight: 700; }
.eb-content a { color: var(--eb-accent); text-decoration: underline; text-underline-offset: 3px; }
.eb-content blockquote { margin: 2em 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--eb-accent); font-family: var(--eb-serif); font-size: 26px; line-height: 1.45; font-style: italic; color: #1c1c1c; }
.eb-content img { max-width: 100% !important; height: auto !important; margin: 1.6em 0; display: block; }
.eb-content iframe { max-width: 100%; }
.eb-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 16px; }
.eb-content th, .eb-content td { border-bottom: 1px solid #e5e5e5; padding: 10px 8px; text-align: left; }

/* Índice lateral */
.eb-aside { position: sticky; top: calc(var(--ee-header-h) + 40px); align-self: start; }
.eb-toc { border-top: 2px solid #1c1c1c; padding-top: 18px; margin-bottom: 36px; }
.eb-toc h4, .eb-aside-box h4 { font-size: 12px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: #1c1c1c; margin-bottom: 14px; font-family: 'Lato', sans-serif; }
.eb-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.eb-toc li { counter-increment: toc; }
.eb-toc a { display: grid; grid-template-columns: 26px 1fr; padding: 8px 0; font-size: 14px; line-height: 1.45; color: #777; border-bottom: 1px solid #f0f0f0; transition: color .2s ease; }
.eb-toc a::before { content: counter(toc, decimal-leading-zero); font-size: 11px; color: #bbb; padding-top: 2px; }
.eb-toc a:hover, .eb-toc a.ativo { color: #1c1c1c; }
.eb-toc a.ativo::before { color: var(--eb-accent); }
.eb-aside-box { background: #f6f4f1; padding: 26px 24px; }
.eb-aside-box p { font-size: 14px; line-height: 1.65; color: #666; margin-bottom: 18px; }
.eb-aside-box .ee-btn { width: 100%; }

/* Índice no telemóvel */
.eb-toc-mobile { display: none; border: 1px solid #e5e5e5; margin-bottom: 30px; }
.eb-toc-mobile summary { list-style: none; padding: 14px 18px; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; cursor: pointer; display: flex; justify-content: space-between; }
.eb-toc-mobile summary::-webkit-details-marker { display: none; }
.eb-toc-mobile .eb-toc { border: none; margin: 0; padding: 0 18px 10px; }

/* Final do artigo */
.eb-article-foot { max-width: 720px; margin: 0 auto; padding-bottom: 20px; }
.eb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.eb-tags a { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; border: 1px solid #ddd; padding: 6px 12px; color: #444; }
.eb-tags a:hover { border-color: #1c1c1c; color: #1c1c1c; }
.eb-share-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; margin-bottom: 40px; }
.eb-share-row strong { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; margin-right: 8px; }
.eb-author { display: grid; grid-template-columns: 90px 1fr; gap: 24px; align-items: start; padding: 30px; background: #f6f4f1; }
.eb-author img { width: 90px; height: 90px; border-radius: 50% !important; background: #fff; padding: 16px; object-fit: contain; }
.eb-author h4 { font-family: var(--eb-serif); font-weight: 500; font-size: 22px; margin-bottom: 8px; }
.eb-author p { font-size: 15px; line-height: 1.7; color: #666; margin-bottom: 16px; }
.eb-author .ee-hero-actions { gap: 10px; }
.eb-author .ee-btn { padding: 11px 18px; }

.eb-related { background: #faf9f7; border-top: 1px solid var(--ee-line); }
.eb-copied { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); background: #1c1c1c; color: #fff; padding: 12px 20px; font-size: 14px; opacity: 0; transition: all .3s ease; z-index: 2000; pointer-events: none; }
.eb-copied.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1199px) {
    .eb-layout { grid-template-columns: minmax(0, 720px) 260px; gap: 50px; }
    .eb-share-side { display: none; }
}
@media (max-width: 991px) {
    .eb-grid { grid-template-columns: repeat(2, 1fr); gap: 46px 28px; }
    .eb-grid .eb-card-lg { grid-column: span 2; }
    .eb-layout { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
    .eb-aside { position: static; }
    .eb-aside .eb-toc { display: none; }
    .eb-toc-mobile { display: block; }
    .eb-search { flex-basis: 200px; }
}
@media (max-width: 767px) {
    .eb-cover { min-height: 78vh; }
    .eb-cover::after { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.45) 35%, rgba(0,0,0,.88) 100%); }
    .eb-cover .container { padding-bottom: 46px; }
    .eb-cover p { font-size: 16px; }
    .eb-nav .container { flex-direction: column; align-items: stretch; gap: 0; }
    .eb-search { flex-basis: auto; margin-bottom: 12px; }
    .eb-grid { grid-template-columns: 1fr; gap: 44px; }
    .eb-grid .eb-card-lg { grid-column: auto; grid-template-columns: 1fr; gap: 0; }
    .eb-grid .eb-card-lg .eb-card-img { margin-bottom: 20px; }
    .eb-grid .eb-card-lg h3 { font-size: 26px; }
    .eb-article-head { padding: 36px 0 26px; }
    .eb-article-head .eb-inner { text-align: left; }
    .eb-dek { font-size: 18px; margin-left: 0; }
    .eb-hero-img img { aspect-ratio: 4 / 3; }
    .eb-content { font-size: 18px; }
    .eb-content h2 { font-size: 28px; }
    .eb-content h3 { font-size: 23px; }
    .eb-author { grid-template-columns: 1fr; padding: 24px; }
}
