/*
Theme Name: Rede Gess News
Description: Tema de notícias multi-marca da Rede Gess — cada blog usa as cores da sua empresa.
Version: 1.0
Author: Rede Gess
Text Domain: redegess-news
*/

:root {
  --brand: #334155;
  --brand-dark: #1e293b;
  --brand-accent: #38bdf8;
  --ink: #1a2230;
  --muted: #5a6474;
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e4e8ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .07);
  --shadow-lg: 0 8px 30px rgba(16, 24, 40, .14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 26px 0 0;
}
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-branding a { color: #fff; text-decoration: none; }
.site-title { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -.5px; }
.site-title .dot { color: var(--brand-accent); }
.site-tagline { margin: 2px 0 0; font-size: .95rem; opacity: .85; }

/* Logo da marca no header */
.brand-logo { display: inline-flex; align-items: center; gap: 14px; }
.brand-logo img { display: block; height: 48px; width: auto; }
.brand-logo.mode-chip {
  background: #fff; padding: 10px 20px; border-radius: 14px; box-shadow: var(--shadow);
}
.brand-logo.mode-chip img { height: 42px; }
.brand-logo.mode-icon img { height: 54px; }
.brand-logo .site-title { line-height: 1; }
.site-branding .brand-logo + .screen-reader-text + .site-tagline,
.site-branding .brand-logo ~ .site-tagline { margin-top: 8px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
@media (max-width: 640px) {
  .brand-logo.mode-chip img { height: 32px; }
  .brand-logo.mode-icon img { height: 42px; }
}
.header-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn-site {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35);
  color: #fff; text-decoration: none; padding: 9px 18px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; transition: background .2s;
}
.btn-site:hover { background: rgba(255,255,255,.26); }
.header-search form { display: flex; }
.header-search input[type="search"] {
  border: 0; border-radius: 999px 0 0 999px; padding: 9px 16px; font-size: .9rem; min-width: 170px; outline: none;
}
.header-search button {
  border: 0; border-radius: 0 999px 999px 0; padding: 9px 16px; cursor: pointer;
  background: var(--brand-accent); color: var(--brand-dark); font-weight: 700;
}

/* Category pills */
.cat-bar { margin-top: 20px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.18); }
.cat-bar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.cat-bar a {
  display: inline-block; color: #fff; text-decoration: none; font-size: .85rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.12); transition: background .2s;
}
.cat-bar a:hover { background: var(--brand-accent); color: var(--brand-dark); }
.cat-bar .home-link a { background: var(--brand-accent); color: var(--brand-dark); }

/* ===== Layout ===== */
.content-area { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; padding: 38px 0 50px; }
@media (max-width: 900px) { .content-area { grid-template-columns: 1fr; } }

.section-label {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-dark);
}
.section-label::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--brand), transparent); }

/* ===== Hero ===== */
.hero-card {
  display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; margin-bottom: 34px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none;
}
@media (max-width: 700px) { .hero-card { grid-template-columns: 1fr; } }
.hero-media { min-height: 280px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); position: relative; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-media .placeholder-letter, .card-media .placeholder-letter {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; font-weight: 800; color: rgba(255,255,255,.35);
}
.hero-body { padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; }
.hero-body h2 { margin: 8px 0 12px; font-size: 1.55rem; line-height: 1.3; letter-spacing: -.3px; }
.hero-body h2 a { color: var(--ink); text-decoration: none; }
.hero-body h2 a:hover { color: var(--brand); }
.hero-body p { margin: 0 0 14px; color: var(--muted); }

/* ===== Cards grid ===== */
.posts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 620px) { .posts-grid { grid-template-columns: 1fr; } }
.post-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 8px 0 10px; font-size: 1.08rem; line-height: 1.4; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--brand); }
.card-body .excerpt { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }

.badge-cat {
  display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: #fff; background: var(--brand); padding: 3px 10px; border-radius: 999px; text-decoration: none;
}
.post-meta { display: flex; gap: 12px; align-items: center; margin-top: 14px; font-size: .8rem; color: var(--muted); }

.read-more { color: var(--brand); font-weight: 700; text-decoration: none; font-size: .9rem; }
.read-more:hover { text-decoration: underline; }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 22px 24px; }
.widget-title {
  margin: 0 0 16px; font-size: .95rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--brand-dark); padding-bottom: 10px; border-bottom: 3px solid var(--brand);
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a { color: var(--ink); text-decoration: none; }
.widget ul li a:hover { color: var(--brand); }
.widget .post-date { display: block; font-size: .78rem; color: var(--muted); }

.widget-search form { display: flex; }
.widget-search input[type="search"] {
  flex: 1; border: 1px solid var(--line); border-radius: 10px 0 0 10px; padding: 10px 14px; font-size: .9rem; outline: none; min-width: 0;
}
.widget-search button {
  border: 0; border-radius: 0 10px 10px 0; padding: 10px 16px; cursor: pointer; background: var(--brand); color: #fff; font-weight: 700;
}

/* Calendário de notícias */
#wp-calendar { width: 100%; border-collapse: collapse; font-size: .88rem; }
#wp-calendar caption { font-weight: 700; color: var(--brand-dark); padding-bottom: 10px; text-transform: capitalize; }
#wp-calendar th, #wp-calendar td { text-align: center; padding: 7px 2px; }
#wp-calendar th { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
#wp-calendar td { color: var(--muted); }
#wp-calendar td a {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  background: var(--brand); color: #fff; border-radius: 50%; text-decoration: none; font-weight: 700;
}
#wp-calendar td a:hover { background: var(--brand-dark); }
#wp-calendar td#today { font-weight: 800; color: var(--brand-dark); }
.wp-calendar-nav { display: flex; justify-content: space-between; margin-top: 8px; font-size: .85rem; }
.wp-calendar-nav a { color: var(--brand); text-decoration: none; font-weight: 600; }

/* ===== Single ===== */
.single-article { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.single-hero img { width: 100%; max-height: 440px; object-fit: cover; display: block; }
.single-inner { padding: 34px 40px 40px; }
@media (max-width: 700px) { .single-inner { padding: 24px 20px 28px; } }
.single-inner h1 { margin: 10px 0 14px; font-size: 1.9rem; line-height: 1.25; letter-spacing: -.5px; }
.single-content { font-size: 1.05rem; }
.single-content a { color: var(--brand); font-weight: 600; }
.nb-source {
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  border-left: 4px solid var(--brand);
  padding: 14px 18px; border-radius: 0 10px 10px 0; font-size: .95rem;
}
.tags-list { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.tags-list a {
  font-size: .78rem; color: var(--brand-dark); background: var(--bg); border: 1px solid var(--line);
  text-decoration: none; padding: 4px 12px; border-radius: 999px;
}
.tags-list a:hover { border-color: var(--brand); color: var(--brand); }

.related { margin-top: 34px; }

/* ===== Pagination ===== */
.pagination-wrap { margin-top: 34px; }
.pagination-wrap .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination-wrap .page-numbers {
  display: inline-block; padding: 9px 16px; background: var(--card); border-radius: 10px;
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.pagination-wrap .page-numbers.current, .pagination-wrap .page-numbers:hover { background: var(--brand); color: #fff; }

/* ===== Archive header ===== */
.archive-header { margin: 0 0 24px; }
.archive-header h1 { margin: 0; font-size: 1.5rem; color: var(--brand-dark); }
.archive-header p { margin: 6px 0 0; color: var(--muted); }

/* ===== Footer ===== */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.85); margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; padding: 44px 0 30px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.site-footer a { color: var(--brand-accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { padding: 5px 0; font-size: .92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0; font-size: .84rem;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; opacity: .8;
}
