/* CheriffAI Blog — design tokens matched to main site */
:root {
  --bg:           #050715;
  --bg-header:    #07091ae6;
  --bg-card:      #070a1ce6;
  --bg-card-alt:  #090d24e0;
  --bg-section:   #06091c59;
  --border:       rgba(255,255,255,.08);
  --text:         #eef0ff;
  --text-muted:   #eef0ffbf;
  --text-faint:   #eef0ffb3;
  --text-faintest:#ffffff8c;
  --accent-blue:  #45b6ff;
  --accent-blue2: #58b0ff;
  --accent-purple:#7c5bff;
  --accent-lavender:#7c97ff;
  --grad:         linear-gradient(90deg,#7c5bff,#45b6ff);
  --font:         Inter,'Helvetica Neue',Helvetica,Arial,sans-serif;
  --radius-card:  22px;
  --radius-btn:   999px;
}

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

html{scroll-behavior:smooth;}
html,body{
  min-height:100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a{color:var(--accent-blue);text-decoration:none}
a:hover{color:#fff}

/* ── Page wrapper ── */
.page-container{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:radial-gradient(140% 120% at 0% 0%,#587eff40,#060922e6 55%,#050715);
}

/* ── Header ── */
.header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:1.25rem clamp(1rem,4vw,3.5rem);
  border-bottom:1px solid var(--border);
  background:var(--bg-header);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  position:sticky;
  top:0;
  z-index:10;
}

.logo-container{display:flex;align-items:center;gap:.75rem;text-decoration:none}
.logo{width:44px;height:44px;object-fit:contain}
.logo-text{font-size:1.3rem;font-weight:600;color:#fff}

.header-nav{display:flex;gap:1.5rem;align-items:center}
.nav-link{
  color:var(--text-muted);
  text-decoration:none;
  font-weight:500;
  font-size:.95rem;
  letter-spacing:.01em;
  transition:color .2s ease;
}
.nav-link:hover,.nav-link:focus,.nav-link--active{color:#fff}

.auth-buttons{display:flex;gap:.75rem}
.btn{
  padding:.6rem 1.2rem;
  border-radius:var(--radius-btn);
  border:1px solid rgba(255,255,255,.25);
  color:#fff;
  text-decoration:none;
  font-weight:600;
  font-size:.85rem;
  transition:border-color .2s ease;
  font-family:var(--font);
  cursor:pointer;
  background:transparent;
  min-height:44px;
  display:inline-flex;
  align-items:center;
}
.btn-login:hover{border-color:#fff}
.btn-signup{background:var(--grad);border:none}

/* ── Blog hero ── */
.blog-hero{
  padding:clamp(2.5rem,6vw,4rem) clamp(1.25rem,6vw,6rem) clamp(1.5rem,4vw,2.5rem);
}
.blog-hero .eyebrow{
  text-transform:uppercase;
  letter-spacing:.18em;
  font-size:.7rem;
  color:var(--text-faintest);
  display:block;
  margin-bottom:.75rem;
}
.blog-hero h1{
  font-size:clamp(2rem,4vw,3rem);
  line-height:1.1;
  color:#fff;
  margin-bottom:.75rem;
}
.blog-hero h1 span{
  background:var(--grad);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.blog-hero p{color:var(--text-muted);max-width:540px;line-height:1.6}

/* ── Tag filter ── */
.tag-bar{
  padding:0 clamp(1.25rem,6vw,6rem) 1.5rem;
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}
.tag-btn{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-faint);
  padding:.3rem .85rem;
  border-radius:var(--radius-btn);
  font-size:.8rem;
  cursor:pointer;
  transition:all .15s;
  font-family:var(--font);
}
.tag-btn:hover,.tag-btn.active{
  border-color:var(--accent-blue);
  color:var(--accent-blue);
  background:rgba(69,182,255,.06);
}

/* ── Posts grid ── */
.posts-grid{
  flex:1;
  padding:0 clamp(1.25rem,6vw,6rem) clamp(3rem,6vw,5rem);
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:1.35rem;
  align-content:start;
}

/* ── Post card ── */
.post-card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  text-decoration:none;
  color:inherit;
  transition:border-color .2s ease,transform .2s ease;
}
.post-card:hover{
  border-color:rgba(69,182,255,.35);
  transform:translateY(-3px);
}

.post-card__cover{
  width:100%;
  aspect-ratio:16/9;
  object-fit:cover;
}
.post-card__cover-placeholder{
  width:100%;
  aspect-ratio:16/9;
  background:linear-gradient(135deg,#080c22 0%,#0d1535 100%);
  display:flex;
  align-items:center;
  justify-content:center;
}
.post-card__cover-placeholder svg{opacity:.15}

.post-card__body{
  padding:1.4rem 1.5rem 1.6rem;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:.55rem;
}

.post-card__tags{display:flex;gap:.35rem;flex-wrap:wrap}
.post-card__tag{
  font-size:.75rem;
  color:var(--accent-lavender);
  background:#7c5bff1a;
  border:1px solid #7c5bff33;
  padding:.15rem .6rem;
  border-radius:var(--radius-btn);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.post-card__title{
  font-size:1.05rem;
  font-weight:600;
  line-height:1.35;
  color:#fff;
}
.post-card__excerpt{
  font-size:.88rem;
  color:var(--text-muted);
  line-height:1.55;
  flex:1;
}
.post-card__meta{
  font-size:.82rem;
  color:var(--text-faintest);
  display:flex;
  justify-content:space-between;
  margin-top:.2rem;
}

/* ── Empty / loading state ── */
.state-msg{
  grid-column:1/-1;
  padding:4rem 0;
  text-align:center;
  color:var(--text-faint);
}
.state-msg h2{font-size:1.1rem;margin-bottom:.4rem;font-weight:500}

/* ── Pagination ── */
.pagination{
  padding:0 clamp(1.25rem,6vw,6rem) clamp(2rem,4vw,3rem);
  display:flex;
  justify-content:center;
  gap:.5rem;
}
.page-btn{
  background:var(--bg-card);
  border:1px solid var(--border);
  color:var(--text-faint);
  padding:.4rem .9rem;
  border-radius:8px;
  cursor:pointer;
  font-size:.85rem;
  font-family:var(--font);
  transition:all .15s;
}
.page-btn:hover,.page-btn.active{border-color:var(--accent-blue);color:var(--accent-blue)}
.page-btn:disabled{opacity:.3;cursor:default}

/* ── Footer ── */
.footer{
  margin-top:auto;
  padding:2rem clamp(1.25rem,4vw,3rem);
  border-top:1px solid var(--border);
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  color:var(--text-faint);
  font-size:.85rem;
}
.footer__links{display:flex;gap:1rem}
.footer__links a{color:var(--text-faint);text-decoration:none;transition:color .2s}
.footer__links a:hover{color:#fff}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Individual post page
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.post-layout{
  max-width:780px;
  margin:0 auto;
  padding:clamp(2rem,5vw,3.5rem) clamp(1.25rem,4vw,2rem) clamp(4rem,8vw,6rem);
  flex:1;
}

.post-back{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  color:var(--text-faint);
  font-size:.85rem;
  margin-bottom:2.5rem;
  transition:color .2s;
  text-decoration:none;
}
.post-back:hover{color:#fff}

.post-header{margin-bottom:2.5rem}

.post-tags{display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem}
.post-tag{
  font-size:.78rem;
  color:var(--accent-lavender);
  background:#7c5bff1a;
  border:1px solid #7c5bff33;
  padding:.2rem .65rem;
  border-radius:var(--radius-btn);
  text-transform:uppercase;
  letter-spacing:.04em;
}

.post-layout h1{
  font-size:clamp(1.75rem,4vw,2.6rem);
  line-height:1.15;
  color:#fff;
  margin-bottom:.85rem;
}

.post-meta{
  display:flex;
  gap:1.25rem;
  color:var(--text-faintest);
  font-size:.85rem;
}

.post-cover{
  width:100%;
  border-radius:var(--radius-card);
  border:1px solid var(--border);
  margin-bottom:2.5rem;
}

/* ── Post content typography ── */
.post-content{font-size:1rem;line-height:1.8;color:var(--text-muted)}

.post-content h2{
  font-size:1.5rem;font-weight:600;
  color:#fff;margin:2.25rem 0 .75rem;
}
.post-content h3{
  font-size:1.2rem;font-weight:600;
  color:var(--accent-blue2);margin:1.75rem 0 .6rem;
}
.post-content p{margin-bottom:1.25rem}
.post-content ul,.post-content ol{margin:0 0 1.25rem 1.5rem}
.post-content li{margin-bottom:.4rem}

.post-content blockquote{
  border-left:3px solid var(--accent-purple);
  padding:.6rem 0 .6rem 1.4rem;
  color:var(--text-muted);
  font-style:italic;
  margin:1.75rem 0;
}

.post-content code{
  background:var(--bg-card-alt);
  border:1px solid var(--border);
  padding:.15rem .4rem;
  border-radius:5px;
  font-size:.88em;
  font-family:'JetBrains Mono','Fira Code',monospace;
  color:var(--accent-blue);
}
.post-content pre{
  background:var(--bg-card-alt);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  padding:1.25rem 1.5rem;
  overflow-x:auto;
  margin:1.75rem 0;
}
.post-content pre code{
  background:none;border:none;padding:0;
  color:var(--text);font-size:.9rem;
}
.post-content img{
  max-width:100%;border-radius:var(--radius-card);
  border:1px solid var(--border);margin:1rem 0;
}
.post-content a{
  color:var(--accent-blue);
  text-decoration:underline;
  text-decoration-color:rgba(69,182,255,.4);
}
.post-content hr{border:none;border-top:1px solid var(--border);margin:2.25rem 0}
.post-content strong{color:#fff}

/* ── Vídeo nativo ── */
.post-content video{
  width:100%;
  border-radius:var(--radius-card);
  border:1px solid var(--border);
  margin:1.75rem 0;
  display:block;
}

/* ── Iframe responsivo (YouTube / Vimeo) ── */
.post-content .video-wrapper{
  position:relative;
  padding-bottom:56.25%; /* 16:9 */
  height:0;
  overflow:hidden;
  border-radius:var(--radius-card);
  margin:1.75rem 0;
  border:1px solid var(--border);
}
.post-content .video-wrapper iframe{
  position:absolute;
  top:0;left:0;
  width:100%;height:100%;
  border:0;
}

/* ── Figura com legenda ── */
.post-content figure{margin:1.75rem 0}
.post-content figure img,
.post-content figure video{margin:0}
.post-content figcaption{
  text-align:center;
  font-size:.82rem;
  color:var(--text-faintest);
  margin-top:.5rem;
  font-style:italic;
}

/* ── Social icons ── */
.footer__links a{display:inline-flex;align-items:center;}
svg.social-icon{width:22px;height:22px;display:block;transition:opacity .2s;}
.footer__links a{opacity:.65;transition:opacity .2s;}
.footer__links a:hover,.footer__links a:focus{opacity:1;color:#fff;}

/* ── Mobile hamburger button ── */
.mobile-menu-btn{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:.5rem;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  z-index:101;
}
.mobile-menu-btn span{
  display:block;
  width:22px;
  height:2px;
  background:#eef0ff;
  border-radius:2px;
  transition:all .25s;
}
.mobile-menu-btn.open span:first-child{transform:translateY(7px) rotate(45deg);}
.mobile-menu-btn.open span:nth-child(2){opacity:0;}
.mobile-menu-btn.open span:last-child{transform:translateY(-7px) rotate(-45deg);}

/* ── Mobile nav overlay ── */
.mobile-nav{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(5,7,21,.96);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  z-index:100;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2rem;
}
.mobile-nav.open{display:flex;}
.mobile-nav>.nav-link{
  font-size:1.4rem;
  font-weight:600;
  color:var(--text-muted);
  text-decoration:none;
  transition:color .2s;
}
.mobile-nav>.nav-link:hover,
.mobile-nav>.nav-link--active{color:#fff;}
.mobile-nav-auth{display:flex;gap:.75rem;margin-top:1rem;}

/* ── Newsletter section ── */
.newsletter{
  margin:clamp(1.5rem,4vw,3rem) clamp(1.25rem,6vw,6rem);
  padding:clamp(1.75rem,3.5vw,2.25rem) clamp(1.5rem,4vw,2.5rem);
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  background-image:radial-gradient(ellipse 55% 90% at 100% 50%,rgba(69,182,255,.07),transparent);
}
.newsletter-inner{
  display:flex;
  align-items:center;
  gap:2.5rem;
  flex-wrap:wrap;
}
.newsletter-copy{flex:1;min-width:200px;}
.newsletter-eyebrow{
  display:inline-block;
  font-size:.68rem;
  text-transform:uppercase;
  letter-spacing:.16em;
  color:var(--accent-blue);
  margin-bottom:.5rem;
}
.newsletter-headline{
  font-size:clamp(1.1rem,2.4vw,1.45rem);
  font-weight:700;
  color:#fff;
  margin:0 0 .3rem;
  line-height:1.25;
}
.newsletter-headline span{
  background:var(--grad);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
}
.newsletter-sub{
  font-size:.86rem;
  color:var(--text-muted);
  margin:0;
}
.newsletter-cta{flex:0 0 auto;min-width:260px;}
.newsletter-form{display:flex;gap:.5rem;}
.newsletter-input{
  flex:1;
  min-width:0;
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:var(--radius-btn);
  color:var(--text);
  padding:.65rem 1rem;
  font-size:.9rem;
  font-family:var(--font);
  outline:none;
  transition:border-color .2s;
}
.newsletter-input:focus{border-color:var(--accent-purple);}
.newsletter-input::placeholder{color:var(--text-faintest);}
.newsletter-submit{
  background:var(--grad);
  border:none;
  border-radius:var(--radius-btn);
  color:#fff;
  font-weight:600;
  font-size:.875rem;
  padding:.65rem 1.25rem;
  cursor:pointer;
  font-family:var(--font);
  transition:opacity .2s;
  min-height:44px;
  white-space:nowrap;
}
.newsletter-submit:hover{opacity:.85;}
.newsletter-submit:disabled{opacity:.5;cursor:default;}
.newsletter-msg{
  margin-top:.55rem;
  font-size:.82rem;
  min-height:1.1em;
}
.newsletter-msg.ok{color:#45ffaa;}
.newsletter-msg.err{color:#ff7070;}

/* ── Responsive ── */
@media(max-width:600px){
  .header-nav{display:none;}
  .mobile-menu-btn{display:flex;}
  .posts-grid{grid-template-columns:1fr;}
}
@media(max-width:640px){
  .auth-buttons{display:none;}
  .mobile-menu-btn{display:flex;}
}
@media(max-width:680px){
  .footer{flex-direction:column;align-items:center;text-align:center;}
  .footer__links{flex-wrap:wrap;justify-content:center;gap:.85rem;}
}
@media(max-width:580px){
  .newsletter-form{flex-direction:column;}
  .newsletter-submit{width:100%;}
  .newsletter-cta{min-width:0;width:100%;}
}
