/* ============================================================
   Re>Pal — shared styles for the News & Blog pages
   Used by: repal-blog.php (archive)  ·  repal-post.php (article)
   The home page keeps its own inline <style>; the tokens below
   are copied from it so both look identical.
============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #1a3c2a;
  --green-mid:    #2d6a4a;
  --green-accent: #4a9e6a;
  --green-light:  #e8f5ee;
  --white:        #ffffff;
  --off-white:    #f6f9f7;
  --text-dark:    #1a1a1a;
  --text-mid:     #4a5568;
  --text-light:   #b8d4c2;
  --border:       rgba(0,0,0,0.08);
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* ---------- utility ---------- */
.container       { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--green-accent); margin-bottom: 8px; }
.section-title   { font-size: 28px; font-weight: 700; color: var(--green-dark); line-height: 1.25; margin-bottom: 8px; }
.section-sub     { font-size: 14px; color: var(--text-mid); margin-bottom: 28px; }
.btn-primary     { display: inline-block; background: var(--green-accent); color: #fff; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: background 0.2s; }
.btn-primary:hover { background: var(--green-mid); }
.tag             { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 20px; }

/* ---------- language switch ---------- */
.lang-switch { display: flex; gap: 4px; }
.lang-switch a {
  font-size: 11px; color: var(--text-light); padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 4px;
}
.lang-switch a.active { background: var(--green-accent); color: #fff; border-color: var(--green-accent); }

/* ---------- navbar ---------- */
.navbar {
  background: var(--green-dark);
  position: sticky; top: 0; z-index: 1000;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
/* Logo art is dark navy on transparent, so it needs a light plate to sit
   on against the dark-green navbar. */
.navbar-logo {
  display: flex; align-items: center; line-height: 0;
  background: #fff; padding: 6px 12px; border-radius: var(--radius-sm);
  transition: box-shadow 0.2s;
}
.navbar-logo:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.25); }
.navbar-logo img { height: 34px; width: auto; display: block; }
.navbar-links { display: flex; gap: 28px; }
.navbar-links a { font-size: 13px; color: var(--text-light); transition: color 0.2s; }
.navbar-links a:hover, .navbar-links a.active { color: #fff; }
.navbar-right { display: flex; align-items: center; gap: 16px; }

/* ---------- blog cards (shared with home page markup) ---------- */
.blog-grid  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card  { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow 0.2s; display: block; }
.blog-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.blog-thumb { height: 160px; background: var(--green-light); overflow: hidden; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.blog-card:hover .blog-thumb img { transform: scale(1.04); }
.blog-body  { padding: 18px; }
.blog-body .tag { margin-bottom: 10px; }
.blog-body h3 { font-size: 14px; font-weight: 600; color: var(--text-dark); line-height: 1.45; margin-bottom: 8px; }
.blog-excerpt { font-size: 12.5px; color: var(--text-mid); line-height: 1.6; margin-bottom: 10px; }
.blog-meta  { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-mid); }

/* ---------- index page ---------- */
.blog-hero { background: var(--green-dark); padding: 52px 0 44px; color: #fff; }
.blog-hero .section-eyebrow { color: var(--green-accent); }
.blog-hero h1 { font-size: 34px; font-weight: 700; line-height: 1.2; margin-bottom: 10px; }
.blog-hero p  { font-size: 14px; color: var(--text-light); max-width: 640px; }

.blog-index { padding: 48px 0 72px; }

/* featured card — full width, image left */
.blog-feature {
  display: grid; grid-template-columns: 1.05fr 1fr;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 32px; transition: box-shadow 0.2s;
}
.blog-feature:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.09); }
.blog-feature-thumb { background: var(--green-light); min-height: 260px; overflow: hidden; }
.blog-feature-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-feature:hover .blog-feature-thumb img { transform: scale(1.03); }
.blog-feature-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.blog-feature-body h2 { font-size: 22px; font-weight: 700; color: var(--green-dark); line-height: 1.3; margin: 10px 0 10px; }
.blog-feature-body .blog-excerpt { font-size: 14px; margin-bottom: 14px; }
.blog-feature-read { font-size: 13px; font-weight: 500; color: var(--green-accent); margin-top: 14px; }

.blog-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.blog-filter {
  font-size: 12px; padding: 6px 14px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text-mid);
  font-family: inherit; transition: all 0.2s;
}
.blog-filter:hover { border-color: var(--green-accent); color: var(--green-dark); }
.blog-filter.active { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

.blog-empty { padding: 40px 0; font-size: 14px; color: var(--text-mid); }

/* ---------- article page ---------- */
.article-head { background: var(--off-white); padding: 40px 0 32px; border-bottom: 1px solid var(--border); }
.breadcrumb   { font-size: 12px; color: var(--text-mid); margin-bottom: 18px; }
.breadcrumb a { color: var(--green-mid); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { opacity: 0.5; margin: 0 6px; }

.article-head h1 { font-size: 32px; font-weight: 700; color: var(--green-dark); line-height: 1.25; margin: 12px 0 14px; max-width: 820px; }
.article-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-mid); }

.article-hero { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.article-hero-inner { margin-top: 28px; border-radius: var(--radius-lg); overflow: hidden; max-height: 420px; background: var(--green-light); }
.article-hero-inner img { width: 100%; height: 100%; object-fit: cover; }

.article-wrap { padding: 40px 0 64px; }
.article-body { max-width: 720px; margin: 0 auto; }
.article-body .lead { font-size: 17px; line-height: 1.75; color: var(--text-dark); margin-bottom: 20px; }
.article-body p  { font-size: 15px; line-height: 1.8; color: var(--text-mid); margin-bottom: 18px; }
.article-body h2 {
  font-size: 21px; font-weight: 700; color: var(--green-dark);
  line-height: 1.3; margin: 40px 0 14px;
  padding-top: 4px;
}
.article-body h3 {
  font-size: 16px; font-weight: 600; color: var(--green-dark);
  line-height: 1.4; margin: 26px 0 8px;
}
.article-body ul { margin: 0 0 20px 0; padding-left: 0; list-style: none; }
.article-body ul li {
  position: relative; padding-left: 24px; margin-bottom: 12px;
  font-size: 15px; line-height: 1.75; color: var(--text-mid);
}
.article-body ul li::before {
  content: ''; position: absolute; left: 4px; top: 10px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--green-accent);
}

/* numbered steps — counter so the digit can be styled */
.article-body ol { margin: 0 0 20px 0; padding-left: 0; list-style: none; counter-reset: rp-step; }
.article-body ol li {
  position: relative; padding-left: 38px; margin-bottom: 14px;
  font-size: 15px; line-height: 1.75; color: var(--text-mid);
  counter-increment: rp-step;
}
.article-body ol li::before {
  content: counter(rp-step);
  position: absolute; left: 0; top: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--green-accent); color: #fff;
  font-size: 12px; font-weight: 600; line-height: 24px; text-align: center;
}
.article-body li strong { color: var(--text-dark); font-weight: 600; }
.article-body em { color: var(--text-mid); font-style: italic; opacity: 0.85; font-size: 0.92em; }
.article-body code { background: var(--green-light); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
.article-note {
  font-size: 12px; color: var(--text-mid); font-style: italic;
  border-left: 2px solid var(--green-accent); padding: 4px 0 4px 12px;
  margin: -4px 0 24px;
}

/* tables scroll on their own, never the page */
.article-table-wrap { overflow-x: auto; margin: 0 0 12px; -webkit-overflow-scrolling: touch; }
.article-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.article-table th {
  background: var(--green-dark); color: #fff; text-align: left;
  font-weight: 600; font-size: 12.5px; padding: 12px 14px;
}
.article-table th:first-child { border-top-left-radius: var(--radius-sm); }
.article-table th:last-child  { border-top-right-radius: var(--radius-sm); }
.article-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-mid); vertical-align: top; line-height: 1.6; }
.article-table tbody tr:nth-child(odd) { background: var(--off-white); }
.article-table td:first-child { font-weight: 600; color: var(--text-dark); white-space: nowrap; }

.article-cta {
  background: var(--green-light); border-radius: var(--radius-lg);
  padding: 28px; margin: 36px 0 0; text-align: center;
}
.article-cta p { font-size: 15px; color: var(--green-dark); margin-bottom: 16px; }

.article-share { max-width: 720px; margin: 36px auto 0; padding-top: 22px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.article-share span { font-size: 12px; color: var(--text-mid); }
.article-share a {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text-mid);
  transition: all 0.2s;
}
.article-share a:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

/* related posts */
.article-related { background: var(--off-white); padding: 56px 0; border-top: 1px solid var(--border); }

.article-loading { max-width: 720px; margin: 0 auto; padding: 80px 24px; text-align: center; color: var(--text-mid); font-size: 14px; }

/* ---------- footer ---------- */
.footer { background: var(--green-dark); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand-logo { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-tagline { font-size: 12px; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: var(--text-light);
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.footer-social:hover { background: var(--green-accent); color: #fff; }
.footer-col h4 { font-size: 12px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.footer-col a  { display: block; font-size: 12px; color: var(--text-light); margin-bottom: 9px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.footer-bottom span { font-size: 11px; color: rgba(255,255,255,0.35); }

/* ---------- whatsapp floating button ---------- */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 52px; height: 52px; background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.35);
  color: #fff; font-size: 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(37,211,102,0.5); }
.wa-float-tooltip {
  position: absolute; right: 60px; bottom: 50%;
  transform: translateY(50%); white-space: nowrap;
  background: var(--green-dark); color: #fff;
  font-size: 11px; padding: 5px 10px; border-radius: 4px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.wa-float:hover .wa-float-tooltip { opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .blog-grid    { grid-template-columns: repeat(2, 1fr); }
  .blog-feature { grid-template-columns: 1fr; }
  .blog-feature-thumb { min-height: 200px; max-height: 260px; }
  .blog-feature-body  { padding: 24px; }
}
@media (max-width: 768px) {
  .navbar-links { display: none; }
  .blog-grid    { grid-template-columns: 1fr; }
  .footer-grid  { grid-template-columns: 1fr 1fr; }
  .blog-hero h1 { font-size: 26px; }
  .article-head h1 { font-size: 24px; }
  .article-body h2 { font-size: 19px; }
}
