/*
Theme Name: Rigo Blog
Theme URI: https://blog.rigohq.com
Author: Rigo Information Systems
Description: Custom lightweight theme for the Rigo blog. No page builder required.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: rigo-blog
*/

:root {
  --rg-primary: #40205B;
  --rg-primary-soft: #EDE5F3;
  --rg-ink: #10231F;
  --rg-body: #24342F;
  --rg-muted: #52625E;
  --rg-line: #E3E9E7;
  --rg-field: #C9D4D1;
  --rg-surface: #F4F2F6;
  --rg-white: #FFFFFF;
  --rg-radius-sm: 16px;
  --rg-radius-md: 20px;
  --rg-radius-lg: 28px;
  --rg-wrap: 1200px;
  --rg-prose: 680px;
  --rg-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--rg-font); color: var(--rg-ink); background: var(--rg-white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rg-ink); text-decoration: none; }
a:hover { color: var(--rg-primary); }
:focus-visible { outline: 3px solid var(--rg-primary); outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 100; background: var(--rg-white); padding: 12px 16px; border-radius: 8px; }

.rg-wrap { max-width: var(--rg-wrap); margin: 0 auto; padding: 0 24px; }

/* Buttons */
.rg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.rg-btn--primary { background: var(--rg-primary); color: var(--rg-white); }
.rg-btn--primary:hover { color: var(--rg-white); filter: brightness(1.15); }
.rg-btn--dark { background: var(--rg-ink); color: var(--rg-white); }
.rg-btn--dark:hover { color: var(--rg-white); background: #000; }
.rg-btn--outline { background: var(--rg-white); color: var(--rg-ink); border: 1.5px solid var(--rg-ink); }
.rg-btn--outline:hover { background: var(--rg-ink); color: var(--rg-white); }
.rg-btn[disabled] { opacity: .6; cursor: progress; }

/* Header */
.rg-header { border-bottom: 1px solid var(--rg-line); background: var(--rg-white); }
.rg-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.rg-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.rg-brand__mark { width: 32px; height: 32px; border-radius: 9px; background: var(--rg-primary); color: var(--rg-white); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.rg-brand__sub { font-weight: 500; color: var(--rg-muted); }
.rg-brand .custom-logo { max-height: 36px; width: auto; }
.rg-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.rg-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px; }
.rg-nav .current-menu-item > a, .rg-nav .is-current { color: var(--rg-primary); font-weight: 600; }
.rg-nav .rg-btn { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* Hero */
.rg-hero { background: var(--rg-surface); }
.rg-hero__inner { padding-top: 72px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 20px; }
.rg-hero h1 { margin: 0; font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; max-width: 760px; }
.rg-hero p { margin: 0; font-size: 19px; line-height: 1.55; color: #3F504C; max-width: 620px; }
.rg-search { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; max-width: 560px; }
.rg-search input, .rg-input { flex: 1 1 260px; height: 52px; padding: 0 18px; border: 1px solid var(--rg-field); border-radius: 999px; font: inherit; font-size: 16px; background: var(--rg-white); color: var(--rg-ink); }
.rg-search .rg-btn { height: 52px; }

/* Chips */
.rg-chips { position: sticky; top: 0; z-index: 10; background: var(--rg-white); border-bottom: 1px solid var(--rg-line); }
.admin-bar .rg-chips { top: 32px; }
.rg-chips__inner { display: flex; gap: 10px; overflow-x: auto; padding-top: 16px; padding-bottom: 16px; scrollbar-width: none; }
.rg-chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--rg-field); background: var(--rg-white); color: var(--rg-ink); font-size: 15px; font-weight: 600; white-space: nowrap; }
.rg-chip:hover { border-color: var(--rg-ink); color: var(--rg-ink); }
.rg-chip[aria-current="page"] { background: var(--rg-ink); border-color: var(--rg-ink); color: var(--rg-white); }

/* Main sections */
.rg-main { padding-top: 56px; display: flex; flex-direction: column; gap: 72px; }
.rg-section { display: flex; flex-direction: column; gap: 24px; }
.rg-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.rg-section__head h2, .rg-h2 { margin: 0; font-size: 28px; letter-spacing: -0.02em; font-weight: 700; }
.rg-section__head span { font-size: 15px; color: var(--rg-muted); }
.rg-section__head a { font-size: 15px; font-weight: 600; color: var(--rg-primary); }

/* Tags + meta */
.rg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: var(--rg-muted); }
.rg-tag { color: var(--rg-ink); padding: 5px 10px; border-radius: 999px; font-weight: 600; }
.rg-thumb { border-radius: var(--rg-radius-sm); overflow: hidden; aspect-ratio: 3 / 2; }
.rg-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Featured */
.rg-featured { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.rg-featured__main { grid-column: span 2; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.rg-featured__main .rg-thumb { aspect-ratio: 16 / 9; border-radius: var(--rg-radius-md); }
.rg-featured__main .rg-meta { font-size: 14px; }
.rg-featured__main .rg-tag { padding: 6px 12px; }
.rg-featured__main h3 { margin: 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
.rg-featured__main p { margin: 0; font-size: 17px; line-height: 1.6; color: #3F504C; max-width: 640px; }
.rg-featured__side { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.rg-featured__side .rg-thumb { aspect-ratio: 16 / 9; }
@media (max-width: 720px) { .rg-featured__main { grid-column: auto; } }

/* Cards */
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 28px; }
.rg-card { display: flex; flex-direction: column; gap: 14px; }
.rg-card__title { margin: 0; font-size: 20px; line-height: 1.32; letter-spacing: -0.01em; font-weight: 700; }
.rg-card:hover .rg-card__title, .rg-featured__main:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.rg-card__by { font-size: 14px; color: var(--rg-muted); }
.rg-more { display: flex; justify-content: center; padding-top: 16px; }
.rg-pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rg-pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--rg-field); padding: 0 14px; }
.rg-pagination .current { background: var(--rg-ink); color: var(--rg-white); border-color: var(--rg-ink); }
.js .rg-pagination { display: none; }
.rg-empty { padding: 48px 0; font-size: 18px; color: var(--rg-muted); }

/* Newsletter */
.rg-newsletter { background: var(--rg-primary); color: var(--rg-white); border-radius: var(--rg-radius-lg); padding: clamp(32px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.rg-newsletter__copy { display: flex; flex-direction: column; gap: 12px; flex: 1 1 360px; }
.rg-newsletter h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
.rg-newsletter p { margin: 0; font-size: 17px; line-height: 1.55; color: var(--rg-primary-soft); max-width: 480px; }
.rg-newsletter form { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 360px; max-width: 520px; }
.rg-newsletter input[type="email"] { flex: 1 1 220px; height: 54px; padding: 0 18px; border: 0; border-radius: 999px; font: inherit; font-size: 16px; color: var(--rg-ink); }
.rg-newsletter .rg-btn { height: 54px; }

/* Article */
.rg-article__head { max-width: 760px; margin: 0 auto; padding: 48px 24px 0; display: flex; flex-direction: column; gap: 22px; }
.rg-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--rg-muted); }
.rg-breadcrumb a { color: var(--rg-muted); }
.rg-article__head .rg-tag { align-self: flex-start; font-size: 14px; padding: 6px 12px; }
.rg-article__head h1 { margin: 0; font-size: clamp(34px, 4.6vw, 52px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
.rg-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0 4px; }
.rg-author { display: flex; align-items: center; gap: 12px; }
.rg-author img { width: 44px; height: 44px; border-radius: 50%; }
.rg-author__name { display: block; font-weight: 600; font-size: 15px; }
.rg-author__date { display: block; font-size: 14px; color: var(--rg-muted); }
.rg-share { display: flex; gap: 8px; }
.rg-share a, .rg-share button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rg-field); background: var(--rg-white); display: inline-flex; align-items: center; justify-content: center; color: var(--rg-ink); cursor: pointer; padding: 0; }
.rg-share a:hover, .rg-share button:hover { border-color: var(--rg-primary); color: var(--rg-primary); }
.rg-share svg { width: 18px; height: 18px; }
.rg-article__hero { max-width: var(--rg-wrap); margin: 32px auto 0; padding: 0 24px; }
.rg-article__hero img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 24px; }

.rg-prose { max-width: var(--rg-prose); margin: 0 auto; padding: 48px 24px 0; font-size: 18px; line-height: 1.75; color: var(--rg-body); }
.rg-prose > * { margin-top: 0; margin-bottom: 22px; }
.rg-prose > p:first-child { font-size: 21px; line-height: 1.6; color: var(--rg-ink); }
.rg-prose h2 { font-size: 28px; line-height: 1.25; letter-spacing: -0.02em; color: var(--rg-ink); margin-top: 40px; }
.rg-prose h3 { font-size: 22px; line-height: 1.3; color: var(--rg-ink); margin-top: 32px; }
.rg-prose a { color: var(--rg-primary); text-decoration: underline; text-underline-offset: 3px; }
.rg-prose blockquote { padding: 4px 0 4px 24px; border-left: 3px solid var(--rg-primary); margin-left: 0; font-size: 22px; line-height: 1.5; font-weight: 600; color: var(--rg-ink); }
.rg-prose ul, .rg-prose ol { padding-left: 22px; }
.rg-prose li + li { margin-top: 8px; }
.rg-prose img, .rg-prose figure { border-radius: var(--rg-radius-sm); }
.rg-prose figure { margin-left: 0; margin-right: 0; }
.rg-prose figcaption { font-size: 14px; color: var(--rg-muted); margin-top: 8px; }
.rg-prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 16px; }
.rg-prose th, .rg-prose td { border-bottom: 1px solid var(--rg-line); padding: 10px 12px; text-align: left; }

.rg-cta { margin-top: 24px; background: var(--rg-surface); border-radius: var(--rg-radius-md); padding: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.rg-cta__title { display: block; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--rg-ink); }
.rg-cta__text { display: block; font-size: 16px; line-height: 1.5; color: #3F504C; margin-top: 6px; }
.rg-cta .rg-btn { flex: none; text-decoration: none; color: var(--rg-white); }

.rg-after-article { padding-top: 96px; display: flex; flex-direction: column; gap: 88px; }

/* Footer */
.rg-footer { margin-top: 88px; border-top: 1px solid var(--rg-line); }
.rg-footer__inner { padding-top: 40px; padding-bottom: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; font-size: 14px; color: var(--rg-muted); }
.rg-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.rg-footer a { color: var(--rg-muted); }

/* 404 */
.rg-404 { padding: 96px 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.rg-404 h1 { margin: 0; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
