/*
Theme Name: Surra Digital Editorial
Theme URI: https://surradigital.com.br/
Author: HADS / Surra Digital
Description: Tema editorial responsivo para portais de tecnologia, entretenimento e cultura. Desenvolvido para o Surra Digital, com destaques, categorias, espaços publicitários e foco em performance.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: surra-digital
*/

:root {
  --sd-bg: #ffffff;
  --sd-surface: #f5f5f7;
  --sd-text: #101114;
  --sd-muted: #6d7178;
  --sd-line: #e7e7ea;
  --sd-accent: #111111;
  --sd-radius: 18px;
  --sd-container: 1240px;
  --sd-shadow: 0 16px 45px rgba(0,0,0,.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sd-bg);
  color: var(--sd-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .72; }
button, input, textarea, select { font: inherit; }

.sd-container { width: min(calc(100% - 40px), var(--sd-container)); margin-inline: auto; }
.sd-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.sd-header-row { min-height: 76px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 42px; width: auto; }
.sd-brand { display: inline-flex; align-items: baseline; gap: 4px; font-size: 26px; font-weight: 900; letter-spacing: -1.2px; line-height: 1; }
.sd-brand-mark { font-size: 31px; }
.sd-primary-nav { justify-self: center; }
.sd-primary-nav ul { list-style: none; display: flex; align-items: center; gap: 25px; margin: 0; padding: 0; }
.sd-primary-nav a { font-size: 14px; font-weight: 700; }
.sd-header-actions { display: flex; align-items: center; gap: 8px; }
.sd-icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--sd-surface); display: inline-grid; place-items: center; cursor: pointer; color: var(--sd-text); }
.sd-icon-button svg { width: 20px; height: 20px; }
.sd-menu-toggle { display: none; }

.sd-search-panel { display: none; border-top: 1px solid var(--sd-line); padding: 16px 0; background: #fff; }
.sd-search-panel.is-open { display: block; }
.sd-search-form { display: flex; gap: 10px; }
.sd-search-form input[type="search"] { flex: 1; border: 1px solid var(--sd-line); background: var(--sd-surface); border-radius: 999px; padding: 13px 18px; outline: 0; }
.sd-search-form button { border: 0; border-radius: 999px; background: var(--sd-text); color: #fff; font-weight: 800; padding: 0 22px; cursor: pointer; }

/* Breaking */
.sd-breaking { border-bottom: 1px solid var(--sd-line); background: #111; color: #fff; }
.sd-breaking-inner { min-height: 38px; display: flex; align-items: center; gap: 11px; overflow: hidden; }
.sd-breaking-label { text-transform: uppercase; font-size: 11px; font-weight: 900; letter-spacing: .08em; background: #fff; color: #111; border-radius: 999px; padding: 2px 8px; flex: 0 0 auto; }
.sd-breaking a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 650; }

/* Shared */
.site-main { min-height: 60vh; }
.sd-section { padding: 42px 0; }
.sd-section + .sd-section { padding-top: 18px; }
.sd-section-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding-bottom: 13px; border-bottom: 2px solid #111; }
.sd-section-title { margin: 0; font-size: clamp(23px, 3vw, 34px); line-height: 1; letter-spacing: -1.2px; font-weight: 900; }
.sd-section-link { font-size: 13px; font-weight: 800; color: var(--sd-muted); }
.sd-kicker { display: inline-block; margin-bottom: 8px; color: var(--sd-muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.sd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--sd-muted); font-size: 12px; font-weight: 600; }
.sd-meta span + span::before { content: "•"; margin-right: 7px; opacity: .55; }
.sd-card-title { margin: 7px 0 0; font-size: 20px; line-height: 1.12; font-weight: 850; letter-spacing: -.5px; }
.sd-thumb { overflow: hidden; background: var(--sd-surface); border-radius: var(--sd-radius); aspect-ratio: 16 / 9; }
.sd-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
a:hover .sd-thumb img, .sd-card:hover .sd-thumb img { transform: scale(1.025); }
.sd-placeholder { height: 100%; display: grid; place-items: center; background: linear-gradient(145deg,#efeff2,#fafafa); color: #a3a5a9; font-weight: 900; letter-spacing: -.5px; }

/* Hero */
.sd-hero { padding: 28px 0 20px; }
.sd-hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .8fr); gap: 20px; }
.sd-hero-main { position: relative; min-height: 525px; border-radius: 24px; overflow: hidden; background: #111; color: #fff; }
.sd-hero-main .sd-hero-media, .sd-hero-main .sd-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sd-hero-main::after { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.05) 68%); pointer-events: none; }
.sd-hero-main > a, .sd-side-story > a { position: absolute; inset: 0; display: block; z-index: 2; cursor: pointer; }
.sd-hero-content { position: absolute; z-index: 2; inset: auto 0 0; padding: clamp(24px,4vw,42px); pointer-events: none; }
.sd-hero-main .sd-kicker, .sd-hero-main .sd-meta { color: rgba(255,255,255,.8); }
.sd-hero-title { margin: 6px 0 12px; max-width: 900px; font-size: clamp(34px,5vw,62px); line-height: .98; letter-spacing: -2.6px; font-weight: 900; }
.sd-hero-side { display: grid; grid-template-rows: repeat(2, minmax(0,1fr)); gap: 20px; }
.sd-side-story { display: grid; grid-template-columns: 1fr; position: relative; overflow: hidden; border-radius: 22px; min-height: 250px; background: #111; color: #fff; }
.sd-side-story .sd-hero-media, .sd-side-story .sd-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sd-side-story::after { content:""; position:absolute; z-index:1; inset:0; background: linear-gradient(to top,rgba(0,0,0,.82),rgba(0,0,0,.05) 75%); pointer-events:none; }
.sd-side-story-content { position: absolute; z-index: 2; inset: auto 0 0; padding: 22px; pointer-events: none; }
.sd-side-story .sd-card-title { font-size: 23px; color: #fff; }
.sd-side-story .sd-kicker { color: rgba(255,255,255,.78); }

/* Ads */
.sd-ad { margin: 24px auto; display: grid; place-items: center; min-height: 90px; color: #9a9da2; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.sd-ad > * { max-width: 100%; }
.sd-ad-placeholder { width: min(100%, 970px); min-height: 90px; border: 1px dashed #d8d9dd; background: #fafafa; display: grid; place-items: center; border-radius: 8px; }

/* Latest */
.sd-content-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 48px; align-items: start; }
.sd-feed { display: grid; gap: 0; }
.sd-feed-card { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--sd-line); }
.sd-feed-card:first-child { padding-top: 0; }
.sd-feed-card .sd-thumb { border-radius: 14px; }
.sd-feed-card .sd-card-title { font-size: clamp(20px,2.2vw,28px); }
.sd-excerpt { margin: 8px 0 0; color: var(--sd-muted); font-size: 14px; line-height: 1.55; }

/* Sidebar */
.sd-sidebar { position: sticky; top: 110px; }
.sd-widget { margin-bottom: 32px; }
.sd-widget-title { margin: 0 0 15px; padding-bottom: 9px; border-bottom: 2px solid #111; font-size: 18px; line-height: 1.1; font-weight: 900; }
.sd-popular-list { counter-reset: popular; display: grid; }
.sd-popular-item { counter-increment: popular; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--sd-line); }
.sd-popular-item::before { content: counter(popular, decimal-leading-zero); color: #a3a5a9; font-size: 20px; font-weight: 900; line-height: 1; }
.sd-popular-item a { font-size: 15px; font-weight: 800; line-height: 1.25; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--sd-line); }

/* Category sections */
.sd-category-grid { display: grid; grid-template-columns: 1.35fr repeat(2, minmax(0,.8fr)); gap: 22px; }
.sd-category-lead .sd-thumb { aspect-ratio: 16/10; }
.sd-category-lead .sd-card-title { font-size: clamp(25px,3vw,36px); }
.sd-category-secondary { display: grid; align-content: start; gap: 9px; }
.sd-category-secondary .sd-card-title { font-size: 20px; }

/* Archive */
.sd-page-header { padding: 34px 0 12px; }
.sd-page-title { margin: 0; font-size: clamp(32px,4vw,52px); line-height: 1; letter-spacing: -2px; font-weight: 900; }
.sd-page-description { max-width: 680px; margin-top: 14px; color: var(--sd-muted); }
.sd-archive-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 34px 22px; padding: 25px 0 55px; }
.sd-archive-card .sd-card-title { font-size: 22px; }
.navigation.pagination { margin: 20px 0 60px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px; display: grid; place-items: center; background: var(--sd-surface); font-weight: 800; }
.page-numbers.current { background: #111; color: #fff; }

/* Single */
.sd-single-header { max-width: 920px; margin: 0 auto; padding: 55px 0 26px; }
.sd-single-title { margin: 8px 0 16px; font-size: clamp(42px,7vw,78px); line-height: .98; letter-spacing: -3.5px; font-weight: 950; }
.sd-single-deck { margin: 0 0 18px; color: #555a61; font-size: clamp(19px,2.4vw,25px); line-height: 1.35; }
.sd-byline { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.sd-byline img { width: 38px; height: 38px; border-radius: 50%; }
.sd-byline-text { font-size: 13px; line-height: 1.35; }
.sd-single-featured { width: min(calc(100% - 40px), 1180px); margin: 0 auto 35px; }
.sd-single-featured img { width: 100%; border-radius: 24px; max-height: 720px; object-fit: cover; }
.sd-single-layout { width: min(calc(100% - 40px), 1080px); margin: 0 auto; display: grid; grid-template-columns: minmax(0,740px) 260px; justify-content: space-between; gap: 50px; }
.sd-article-content { font-family: Georgia, "Times New Roman", serif; font-size: 20px; line-height: 1.75; color: #202124; overflow-wrap: break-word; }
.sd-article-content > *:first-child { margin-top: 0; }
.sd-article-content h2, .sd-article-content h3, .sd-article-content h4 { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height: 1.08; letter-spacing: -1px; margin-top: 1.7em; }
.sd-article-content h2 { font-size: 34px; }
.sd-article-content h3 { font-size: 28px; }
.sd-article-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sd-article-content blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 4px solid #111; font-style: italic; color: #555; }
.sd-article-content figure { margin: 1.8em 0; }
.sd-article-content figcaption { color: var(--sd-muted); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size: 12px; }
.sd-article-content pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: #111; color: #eee; font-size: 14px; }
.sd-single-aside { position: sticky; top: 110px; align-self: start; }
.sd-share { display: grid; gap: 8px; }
.sd-share a { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--sd-surface); font-size: 12px; font-weight: 800; }
.sd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.sd-tags a { padding: 7px 11px; border-radius: 999px; background: var(--sd-surface); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; font-size: 12px; font-weight: 750; }
.sd-author-box { display: grid; grid-template-columns: 68px 1fr; gap: 18px; margin: 38px 0; padding: 24px; border-radius: 18px; background: var(--sd-surface); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.sd-author-box img { border-radius: 50%; }
.sd-author-box strong { font-size: 17px; }
.sd-author-box p { margin: 5px 0 0; color: var(--sd-muted); font-size: 13px; line-height: 1.5; }
.sd-related { padding: 45px 0 60px; }
.sd-related-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }

/* Footer */
.site-footer { margin-top: 40px; background: #0d0e10; color: #fff; }
.sd-footer-main { padding: 52px 0; display: grid; grid-template-columns: 1.2fr 2fr; gap: 70px; }
.sd-footer-brand { font-size: 30px; font-weight: 950; letter-spacing: -1.5px; }
.sd-footer-about { color: #aaadb4; max-width: 390px; margin: 12px 0 0; font-size: 13px; }
.sd-footer-navs { display: grid; grid-template-columns: repeat(3,1fr); gap: 25px; }
.sd-footer-navs h3 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #7e828a; }
.sd-footer-navs ul { list-style: none; margin: 0; padding: 0; }
.sd-footer-navs li { margin: 7px 0; }
.sd-footer-navs a { font-size: 13px; font-weight: 700; }
.sd-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; color: #7e828a; font-size: 11px; }

/* WP */
.alignwide { margin-left: min(-8vw,-80px); margin-right: min(-8vw,-80px); max-width: 1000px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Responsive */
@media (max-width: 1050px) {
  .sd-primary-nav { display: none; }
  .sd-header-row { grid-template-columns: 1fr auto; }
  .sd-menu-toggle { display: inline-grid; }
  .sd-primary-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 76px; background: #fff; border-bottom: 1px solid var(--sd-line); padding: 18px 20px; box-shadow: var(--sd-shadow); }
  .sd-primary-nav.is-open ul { width: min(100%,var(--sd-container)); margin: auto; display: grid; gap: 2px; }
  .sd-primary-nav.is-open a { display: block; padding: 11px 0; font-size: 16px; }
  .sd-hero-grid { grid-template-columns: 1fr; }
  .sd-hero-main { min-height: 500px; }
  .sd-hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .sd-content-grid { grid-template-columns: minmax(0,1fr) 280px; gap: 30px; }
  .sd-category-grid { grid-template-columns: 1.2fr 1fr; }
  .sd-category-secondary:last-child { display: none; }
  .sd-single-layout { grid-template-columns: minmax(0,1fr); }
  .sd-single-aside { position: static; }
  .sd-share { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 760px) {
  body.admin-bar .site-header { top: 46px; }
  .sd-container { width: min(calc(100% - 28px), var(--sd-container)); }
  .sd-header-row { min-height: 64px; }
  .sd-brand { font-size: 23px; }
  .custom-logo { max-height: 36px; }
  .sd-primary-nav.is-open { top: 64px; }
  .sd-breaking-inner { min-height: 34px; }
  .sd-hero { padding-top: 14px; }
  .sd-hero-grid { gap: 12px; }
  .sd-hero-main { min-height: 430px; border-radius: 18px; }
  .sd-hero-title { letter-spacing: -1.8px; }
  .sd-hero-side { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sd-side-story { min-height: 220px; border-radius: 16px; }
  .sd-side-story-content { padding: 16px; }
  .sd-side-story .sd-card-title { font-size: 18px; }
  .sd-content-grid { grid-template-columns: 1fr; }
  .sd-sidebar { position: static; }
  .sd-feed-card { grid-template-columns: 130px 1fr; gap: 14px; padding: 16px 0; }
  .sd-feed-card .sd-card-title { font-size: 18px; }
  .sd-feed-card .sd-excerpt { display: none; }
  .sd-category-grid { grid-template-columns: 1fr 1fr; }
  .sd-category-lead { grid-column: 1 / -1; }
  .sd-category-secondary:last-child { display: grid; }
  .sd-archive-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sd-single-header { width: min(calc(100% - 28px),920px); padding-top: 34px; }
  .sd-single-title { letter-spacing: -2.2px; }
  .sd-single-featured { width: calc(100% - 28px); }
  .sd-single-featured img { border-radius: 16px; }
  .sd-single-layout { width: calc(100% - 28px); }
  .sd-article-content { font-size: 18px; line-height: 1.72; }
  .sd-article-content h2 { font-size: 29px; }
  .sd-related-grid { grid-template-columns: 1fr 1fr; }
  .sd-footer-main { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 520px) {
  .sd-icon-button { width: 38px; height: 38px; }
  .sd-hero-main { min-height: 390px; }
  .sd-hero-title { font-size: 38px; }
  .sd-hero-side { grid-template-columns: 1fr; }
  .sd-side-story { min-height: 240px; }
  .sd-feed-card { grid-template-columns: 112px 1fr; }
  .sd-feed-card .sd-meta { display: none; }
  .sd-category-grid { grid-template-columns: 1fr; }
  .sd-category-lead { grid-column: auto; }
  .sd-archive-grid { grid-template-columns: 1fr; }
  .sd-single-title { font-size: 43px; }
  .sd-single-deck { font-size: 19px; }
  .sd-share { grid-template-columns: 1fr; }
  .sd-related-grid { grid-template-columns: 1fr; }
  .sd-footer-navs { grid-template-columns: 1fr 1fr; }
}
