/* ============================================================
   Orosiba Group – Blog Shared Styles (blog.css)
   Matches the landing page brand exactly.
   Used by: blog.html, post.html
   ============================================================ */

/* ── Design tokens (mirrors landing page) ─────────────────── */
:root {
  --white:       #FFFFFF;
  --blue-1:      #2A69A1;
  --blue-2:      #105696;
  --blue-3:      #0B5394;
  --bg-light:    #f4f8fd;
  --bg-card:     #ffffff;
  --border:      #d0e3f5;
  --border-mid:  #b8d4ed;
  --text-dark:   #0d1f35;
  --text-mid:    #2c4a6e;
  --text-muted:  #5a7a9a;
  --radius:      10px;
  --radius-lg:   16px;
  --shadow:      0 2px 18px rgba(11,83,148,.08);
  --shadow-card: 0 4px 28px rgba(11,83,148,.12);
  --font:        'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display:Georgia, 'Times New Roman', serif;
  --transition:  .2s ease;
  --max-w:       1100px;
  --read-w:      700px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%; max-width: var(--max-w);
  margin-inline: auto; padding-inline: 24px;
}
.container--read {
  width: 100%; max-width: var(--read-w);
  margin-inline: auto; padding-inline: 24px;
}

/* ── Navigation (identical to landing page) ───────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav__inner {
  max-width: var(--max-w); margin-inline: auto;
  display: flex; align-items: center;
  justify-content: space-between; height: 68px;
}
.nav__logo { display: flex; flex-direction: column; line-height: 1.1; }
.nav__logo-name {
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: .02em; color: var(--blue-3);
}
.nav__logo-tagline {
  font-size: .65rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
.nav__links { display: flex; gap: 36px; list-style: none; }
.nav__links a {
  font-size: .875rem; font-weight: 500;
  color: var(--text-mid); letter-spacing: .03em;
  transition: color var(--transition);
  position: relative; padding-bottom: 3px;
}
.nav__links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--blue-1);
  transition: width .25s ease;
}
.nav__links a:hover { color: var(--blue-2); }
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }
.nav__links a.active { color: var(--blue-3); font-weight: 700; }

.nav__toggle {
  display: none; background: none; border: none;
  cursor: pointer; padding: 4px; flex-direction: column; gap: 5px;
}
.nav__toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--blue-3); border-radius: 2px; transition: all .25s;
}

/* ── Page hero ─────────────────────────────────────────────── */
.blog-hero {
  background: linear-gradient(160deg, var(--blue-3) 0%, var(--blue-2) 55%, var(--blue-1) 100%);
  padding: 72px 24px 64px; position: relative; overflow: hidden;
}
.blog-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.07) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(255,255,255,.04) 0%, transparent 45%);
  pointer-events: none;
}
.blog-hero::after {
  content: ''; position: absolute; right: -100px; top: -100px;
  width: 380px; height: 380px; border-radius: 50%;
  border: 50px solid rgba(255,255,255,.05); pointer-events: none;
}
.blog-hero__inner { position: relative; z-index: 1; }
.blog-hero__eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.3); border-radius: 40px;
  padding: 5px 14px; margin-bottom: 18px;
}
.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: normal; color: var(--white);
  line-height: 1.2; margin-bottom: 14px;
  letter-spacing: -.01em;
}
.blog-hero__sub {
  font-size: 1rem; color: rgba(255,255,255,.78);
  max-width: 520px; line-height: 1.65;
}

/* ── Blog index: article grid ──────────────────────────────── */
.blog-section { padding: 64px 0 80px; background: var(--bg-light); min-height: 40vh; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

/* ── Article card ──────────────────────────────────────────── */
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative; overflow: hidden;
  text-decoration: none; color: inherit;
}
.article-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-3), var(--blue-1));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--border-mid); }
.article-card:hover::before { transform: scaleX(1); }

.article-card__tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-2);
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: 40px; padding: 3px 10px; margin-bottom: 14px;
  width: fit-content;
}
.article-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: normal;
  color: var(--text-dark); line-height: 1.3;
  margin-bottom: 12px; letter-spacing: -.01em;
  flex: 1;
}
.article-card__excerpt {
  font-size: .88rem; color: var(--text-muted);
  line-height: 1.7; margin-bottom: 20px;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.article-card__footer {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--border); padding-top: 14px;
  margin-top: auto;
}
.article-card__meta {
  font-size: .75rem; color: var(--text-muted); line-height: 1.4;
}
.article-card__meta strong { display: block; color: var(--text-mid); font-weight: 600; }
.article-card__read {
  font-size: .8rem; font-weight: 700; color: var(--blue-2);
  white-space: nowrap; display: flex; align-items: center; gap: 4px;
  transition: gap var(--transition);
}
.article-card:hover .article-card__read { gap: 8px; }

/* ── Section heading ───────────────────────────────────────── */
.section-eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue-1); margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: normal; color: var(--text-dark);
  letter-spacing: -.01em;
}

/* ── Loading & error states ────────────────────────────────── */
.state-msg {
  grid-column: 1 / -1; text-align: center;
  padding: 60px 20px; color: var(--text-muted); font-size: .95rem;
}
.state-msg .icon { font-size: 2rem; margin-bottom: 12px; }
.state-msg p { max-width: 380px; margin-inline: auto; line-height: 1.6; }

/* ── Single article: post.html ─────────────────────────────── */
.article-header {
  background: linear-gradient(160deg, var(--blue-3) 0%, var(--blue-2) 55%, var(--blue-1) 100%);
  padding: 72px 24px 60px; position: relative; overflow: hidden;
}
.article-header::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,.07) 0%, transparent 50%);
  pointer-events: none;
}
.article-header::after {
  content: ''; position: absolute; right: -80px; top: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 40px solid rgba(255,255,255,.05); pointer-events: none;
}
.article-header__inner { position: relative; z-index: 1; max-width: var(--read-w); }
.article-header__tag {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.3);
  border-radius: 40px; padding: 4px 12px; margin-bottom: 18px;
}
.article-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: normal; color: var(--white);
  line-height: 1.2; margin-bottom: 18px; letter-spacing: -.01em;
}
.article-header__meta {
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap; font-size: .82rem; color: rgba(255,255,255,.7);
}
.article-header__meta span { display: flex; align-items: center; gap: 5px; }
.article-header__meta span::before {
  content: '·'; margin-right: 2px; opacity: 0;
}
.article-header__meta span + span::before { opacity: 1; }

/* Article body */
.article-body { padding: 56px 0 80px; }
.article-content {
  font-size: 1.05rem; color: var(--text-dark);
  line-height: 1.85;
}
.article-content h2 {
  font-family: var(--font-display); font-weight: normal;
  font-size: 1.5rem; color: var(--blue-3);
  margin: 44px 0 16px; letter-spacing: -.01em; line-height: 1.3;
}
.article-content h3 {
  font-size: 1.1rem; font-weight: 700; color: var(--text-dark);
  margin: 32px 0 12px;
}
.article-content p { margin-bottom: 22px; }
.article-content p:last-child { margin-bottom: 0; }
.article-content ul, .article-content ol {
  padding-left: 22px; margin-bottom: 22px;
}
.article-content li { margin-bottom: 8px; line-height: 1.7; }
.article-content strong { font-weight: 700; color: var(--text-dark); }
.article-content em { font-style: italic; }
.article-content blockquote {
  border-left: 4px solid var(--blue-1);
  padding: 16px 20px; margin: 28px 0;
  background: var(--bg-light); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-mid);
  font-size: 1.05rem; line-height: 1.75;
  /* Prevent text overflowing the highlighted container */
  box-sizing: border-box;
  width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.article-content a { color: var(--blue-2); text-decoration: underline; }
.article-content a:hover { color: var(--blue-3); }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .84rem; font-weight: 600; color: var(--blue-2);
  padding: 18px 0 0; transition: gap var(--transition);
}
.back-link:hover { gap: 10px; }

/* Article nav bar below content */
.article-nav {
  border-top: 1px solid var(--border); margin-top: 48px;
  padding-top: 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.article-nav__back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .875rem; font-weight: 600; color: var(--blue-2);
  padding: 10px 20px; border: 1.5px solid var(--border);
  border-radius: 8px; transition: all var(--transition);
  background: var(--white);
}
.article-nav__back:hover {
  border-color: var(--blue-1); background: var(--bg-light); color: var(--blue-3);
}
.article-nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--blue-3), var(--blue-1));
  color: var(--white); font-size: .875rem; font-weight: 700;
  padding: 10px 22px; border-radius: 8px;
  box-shadow: 0 3px 12px rgba(11,83,148,.25);
  transition: all var(--transition);
}
.article-nav__cta:hover {
  transform: translateY(-1px); box-shadow: 0 5px 18px rgba(11,83,148,.35);
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--text-dark, #0d1f35); padding: 44px 24px;
}
.footer__inner {
  max-width: var(--max-w); margin-inline: auto;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.footer__brand { font-size: .95rem; font-weight: 700; color: var(--white); letter-spacing: .02em; }
.footer__sub   { font-size: .78rem; color: rgba(255,255,255,.45); margin-top: 3px; }
.footer__contact { text-align: center; }
.footer__contact a { font-size: .875rem; color: rgba(255,255,255,.7); transition: color var(--transition); }
.footer__contact a:hover { color: var(--white); }
.footer__copy  { font-size: .78rem; color: rgba(255,255,255,.4); text-align: right; }


/* ── Author byline ──────────────────────────────────────────── */
.author-byline {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 44px;
  padding: 22px 24px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.author-byline__portrait {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-3), var(--blue-1));
  display: flex;
  align-items: center;
  justify-content: center;
}
.author-byline__o {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
  line-height: 1;
  user-select: none;
}
.author-byline__text {
  font-size: .875rem;
  color: var(--text-mid);
  line-height: 1.65;
}
.author-byline__text a {
  color: var(--blue-2);
  font-weight: 700;
  text-decoration: none;
}
.author-byline__text a:hover {
  color: var(--blue-3);
  text-decoration: underline;
}
@media (max-width: 480px) {
  .author-byline { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .55s ease both; }
.fade-up-1 { animation-delay: .1s; }
.fade-up-2 { animation-delay: .22s; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav { overflow: visible; }
  .nav__links { display: none; gap: 0; }
  .nav__links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 68px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 20px 24px; gap: 18px;
    box-shadow: 0 8px 24px rgba(11,83,148,.12);
    z-index: 500;
  }
  .nav__links.open a {
    font-size: 1rem; padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.open li:last-child a { border-bottom: none; }
  .nav__toggle { display: flex; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__copy { text-align: center; }
  .article-nav { flex-direction: column; align-items: flex-start; }
  /* Ensure article content never overflows on narrow screens */
  .article-content { overflow-wrap: break-word; word-break: break-word; }
  .container--read { padding-inline: 20px; }
}
@media (max-width: 480px) {
  .blog-hero, .article-header { padding: 52px 20px 44px; }
  .article-body { padding: 36px 0 60px; }
}
