/* =====================================================
   RINNOVAR BLOG — Main Stylesheet
   Exact match to rinnovar.com design system
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Tokens ── */
:root {
  --bg:          #030712;
  --bg-card:     #0f172a;
  --bg-card2:    rgba(15,23,42,0.7);
  --border:      rgba(31,41,55,0.8);
  --border-soft: rgba(31,41,55,0.4);
  --text:        #f9fafb;
  --text-muted:  #9ca3af;
  --text-dim:    #6b7280;
  --cyan:        #06b6d4;
  --cyan-light:  #67e8f9;
  --blue:        #3b82f6;
  --emerald:     #10b981;
  --violet:      #8b5cf6;
  --r:           12px;
  --r-lg:        16px;
  --r-xl:        20px;
  --max:         1280px;
  --nav-h:       80px;
}

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

html { scroll-behavior: smooth; font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(6,182,212,.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,.7) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .03;
}

a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--cyan-light); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* =====================================================
   NAVBAR — exact match to rinnovar.com
   ===================================================== */
#rn-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(3,7,18,.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(31,41,55,.2);
  transition: background .3s, border-color .3s, box-shadow .3s;
}

#rn-nav.scrolled {
  background: rgba(3,7,18,.95);
  border-bottom-color: rgba(31,41,55,.8);
  box-shadow: 0 4px 32px rgba(0,0,0,.4);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.nav-logo img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: .875rem;
  font-weight: 500;
}

.nav-links a,
.nav-drop-btn {
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: var(--r);
  transition: color .2s, background .2s;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-drop-btn:hover {
  color: #fff;
  background: rgba(31,41,55,.6);
}

.nav-links a.active { color: var(--cyan); }

/* Chevron */
.nav-drop-btn svg {
  transition: transform .2s;
  flex-shrink: 0;
}
.nav-drop-btn.open svg { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 260px;
  background: #111827;
  border: 1px solid rgba(55,65,81,.6);
  border-radius: var(--r-xl);
  padding: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: var(--r);
  color: var(--text);
  transition: background .15s, color .15s;
}
.nav-dropdown-menu a:hover { background: rgba(31,41,55,.8); color: var(--cyan); }

.nav-dropdown-menu a span.label {
  font-size: .875rem;
  font-weight: 600;
  color: #e5e7eb;
}
.nav-dropdown-menu a:hover span.label { color: var(--cyan); }

.nav-dropdown-menu a span.desc {
  font-size: .72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* CTA */
.nav-cta {
  background: var(--cyan);
  color: #030712 !important;
  padding: 10px 20px !important;
  border-radius: var(--r) !important;
  font-weight: 700 !important;
  font-size: .875rem !important;
  box-shadow: 0 4px 16px rgba(6,182,212,.25);
  transition: background .2s, transform .15s !important;
  white-space: nowrap;
}
.nav-cta:hover {
  background: var(--cyan-light) !important;
  color: #030712 !important;
  transform: scale(1.03);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--r);
  color: var(--text-muted);
  transition: color .2s, background .2s;
}
.nav-hamburger:hover { color: #fff; background: rgba(31,41,55,.6); }
.nav-hamburger svg { display: block; }

/* Mobile drawer */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
}

.nav-mobile-drawer {
  position: absolute;
  right: 0; top: 0;
  height: 100%;
  width: 320px;
  max-width: 85vw;
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.nav-mobile-head img { height: 36px; width: auto; }

.nav-mobile-close {
  background: none; border: none;
  cursor: pointer; padding: 6px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: background .2s;
}
.nav-mobile-close:hover { background: rgba(31,41,55,.6); }

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 2px;
  flex: 1;
}

.nav-mobile-links a,
.nav-mobile-acc-btn {
  display: block;
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: .875rem;
  font-weight: 600;
  color: #d1d5db;
  transition: color .2s, background .2s;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.nav-mobile-links a:hover,
.nav-mobile-acc-btn:hover { color: #fff; background: rgba(31,41,55,.6); }

.nav-mobile-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-mobile-acc-btn svg { transition: transform .2s; }
.nav-mobile-acc-btn.open svg { transform: rotate(180deg); }

.nav-mobile-sub {
  display: none;
  flex-direction: column;
  margin-left: 12px;
  gap: 2px;
}
.nav-mobile-sub.open { display: flex; }

.nav-mobile-sub a {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 9px 16px;
}
.nav-mobile-sub a:hover { color: var(--cyan); }

.nav-mobile-cta-wrap {
  padding: 16px;
  margin-top: auto;
}
.nav-mobile-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--cyan);
  color: #030712 !important;
  padding: 12px;
  border-radius: var(--r);
  font-weight: 700;
  font-size: .875rem;
}
.nav-mobile-cta:hover { background: var(--cyan-light) !important; color: #030712 !important; }

/* =====================================================
   PAGE WRAPPER
   ===================================================== */
#rn-page {
  padding-top: var(--nav-h);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* =====================================================
   BLOG HERO BANNER
   ===================================================== */
.blog-hero {
  background: radial-gradient(ellipse at top left, rgba(6,182,212,.12) 0%, transparent 55%),
              radial-gradient(ellipse at bottom right, rgba(59,130,246,.08) 0%, transparent 55%);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px 56px;
  text-align: center;
}

.blog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6,182,212,.1);
  border: 1px solid rgba(6,182,212,.2);
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.blog-hero-badge span {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.8); }
}

.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
}

.blog-hero h1 span {
  background: linear-gradient(135deg, var(--cyan-light), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* =====================================================
   BLOG GRID
   ===================================================== */
.blog-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Post card */
.post-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}

.post-card:hover {
  border-color: rgba(6,182,212,.25);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.5), 0 0 0 1px rgba(6,182,212,.08);
}

/* Thumbnail */
.post-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(15,23,42,.8);
  position: relative;
}

.post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease, filter .4s;
  filter: brightness(.85);
}

.post-card:hover .post-thumb img {
  transform: scale(1.04);
  filter: brightness(1);
}

/* No-image placeholder */
.post-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(6,182,212,.08), rgba(59,130,246,.06));
}

.post-thumb-placeholder svg {
  opacity: .25;
  width: 48px; height: 48px;
  color: var(--cyan);
}

/* Card body */
.post-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* Category badge */
.post-cat {
  display: inline-flex;
  align-items: center;
  background: rgba(6,182,212,.1);
  border: 1px solid rgba(6,182,212,.2);
  color: var(--cyan);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
  transition: background .2s;
}

.post-cat:hover {
  background: rgba(6,182,212,.18);
  color: var(--cyan-light);
}

/* Title */
.post-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1.4;
  transition: color .2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card:hover .post-title { color: var(--cyan-light); }

/* Excerpt */
.post-excerpt {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Meta row */
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
}

.post-date {
  font-size: .75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-date svg { flex-shrink: 0; }

.post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--cyan);
  transition: color .2s, gap .2s;
}

.post-read-more:hover {
  color: var(--cyan-light);
  gap: 8px;
}

/* No posts */
.no-posts {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-dim);
}

.no-posts svg {
  margin: 0 auto 16px;
  opacity: .3;
}

/* Pagination */
.rn-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 48px 0 0;
  flex-wrap: wrap;
}

.rn-pagination a,
.rn-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
}

.rn-pagination a:hover {
  border-color: rgba(6,182,212,.4);
  color: var(--cyan);
  background: rgba(6,182,212,.05);
}

.rn-pagination .current {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #030712;
  font-weight: 700;
}

/* =====================================================
   SINGLE POST
   ===================================================== */
.single-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.single-hero {
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(6,182,212,.08) 0%, transparent 60%);
}

.single-cats {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.single-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.2;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto 20px;
}

.single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: var(--text-dim);
}

.single-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.single-thumb {
  max-width: 860px;
  margin: 40px auto 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.single-thumb img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: cover;
  filter: brightness(.9);
}

/* Content */
.single-content {
  padding-top: 48px;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6 {
  color: var(--text);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 2rem 0 .75rem;
}

.single-content h2 { font-size: 1.5rem; }
.single-content h3 { font-size: 1.2rem; }
.single-content h4 { font-size: 1rem; }

.single-content p { margin-bottom: 1.25rem; }

.single-content a { color: var(--cyan); }
.single-content a:hover { color: var(--cyan-light); }

.single-content strong, .single-content b { color: var(--text); font-weight: 700; }

.single-content ul, .single-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.single-content ul { list-style: disc; }
.single-content ol { list-style: decimal; }
.single-content li { margin-bottom: .4rem; color: var(--text-muted); }

.single-content blockquote {
  background: rgba(6,182,212,.06);
  border-left: 3px solid var(--cyan);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.single-content blockquote p { color: var(--text); margin: 0; }

.single-content code {
  background: rgba(15,23,42,.9);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cyan-light);
  font-family: 'Fira Code', monospace;
  font-size: .85em;
  padding: .15em .45em;
}

.single-content pre {
  background: rgba(15,23,42,.9);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.single-content pre code {
  background: none;
  border: none;
  padding: 0;
}

.single-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.single-content img {
  border-radius: var(--r);
  max-width: 100%;
}

.single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.single-content th {
  background: rgba(31,41,55,.8);
  color: var(--text);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.single-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-muted);
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 32px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all .2s;
}
.back-link:hover {
  color: var(--cyan);
  border-color: rgba(6,182,212,.3);
  background: rgba(6,182,212,.05);
}

/* =====================================================
   FOOTER — exact match to rinnovar.com
   ===================================================== */
#rn-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 24px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
}

/* Brand col */
.footer-brand img {
  height: 56px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand-desc {
  font-size: .875rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 280px;
  margin-bottom: 16px;
}

.footer-payflo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,.06);
  border: 1px solid rgba(16,185,129,.15);
  border-radius: var(--r);
  padding: 10px 14px;
  max-width: 280px;
  margin-bottom: 16px;
}

.footer-payflo-badge span.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

.footer-payflo-badge span.txt {
  font-size: .75rem;
  color: var(--emerald);
  font-weight: 600;
}

.footer-contact {
  font-size: .875rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* Footer col */
.footer-col h4 {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 12px; }

.footer-col ul li a {
  font-size: .875rem;
  color: var(--text-dim);
  transition: color .2s;
}

.footer-col ul li a:hover { color: var(--cyan); }

.footer-col ul li a.highlight {
  color: var(--emerald);
  font-weight: 500;
}

.footer-col ul li a.highlight:hover { color: #34d399; }

.footer-col-gap { margin-top: 24px; }

/* Disclaimer */
.footer-disclaimer {
  margin: 40px 0 0;
  padding: 14px 16px;
  background: rgba(17,24,39,.5);
  border: 1px solid rgba(31,41,55,.6);
  border-radius: var(--r);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-disclaimer svg { flex-shrink: 0; margin-top: 1px; }

.footer-disclaimer p {
  font-size: .72rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.footer-disclaimer p strong {
  color: var(--text-muted);
  font-weight: 600;
}

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 24px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: .72rem;
  color: var(--text-dim);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  font-size: .72rem;
  color: var(--text-dim);
  transition: color .2s;
}

.footer-bottom-links a:hover { color: var(--text-muted); }

/* =====================================================
   UTILITY
   ===================================================== */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(75,85,99,.6); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(6,182,212,.5); }

::selection { background: rgba(6,182,212,.25); color: #fff; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-brand-desc,
  .footer-payflo-badge { max-width: 100%; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .blog-hero { padding: 48px 20px 40px; }
  .blog-grid { grid-template-columns: 1fr; }
  .single-post { padding: 40px 20px 60px; }
  .single-hero { padding: 40px 20px 32px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
}
