/* ============================================================================
   Socializo Blog — self-contained stylesheet.
   Ports the "glass" design tokens from app/globals.css so PHP pages match the
   Next.js frontend without Tailwind.
   ============================================================================ */

:root { --bg: #050505; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: #fff;
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---- Layout ---- */
.section-container { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }
.pt-nav { padding-top: 130px; }

/* ---- Tokens ported from globals.css ---- */
.glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(1, 171, 209, 0.18);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: inset 0 1px 0 rgba(5, 219, 247, 0.05), 0 12px 40px -18px rgba(1, 110, 141, 0.35);
}
.glass-hover { position: relative; border-color: rgba(39, 234, 246, 0.14); transition: background .4s ease, border-color .4s ease, transform .4s ease, box-shadow .4s ease; }
/* Gradient border (bright #27eaf6 corner fading out) via mask — respects radius */
.glass-hover::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, #27eaf6 0%, rgba(39, 234, 246, 0.25) 32%, rgba(1, 110, 141, 0.06) 66%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none; opacity: .6; transition: opacity .4s ease;
}
.glass-hover:hover::before { opacity: 1; }
.glass-hover:hover {
  background: rgba(1, 171, 209, 0.06);
  transform: translateY(-9px);
  box-shadow: 0 0 30px -6px rgba(39, 234, 246, 0.4), 0 20px 50px -20px rgba(1, 110, 141, 0.5);
}
/* Accessibility: solid fallback when the user reduces transparency */
@media (prefers-reduced-transparency: reduce) {
  .glass { background: #0b1519; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.rounded-card { border-radius: 24px; }
.rounded-card-lg { border-radius: 32px; }

.eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .28em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.38);
}
.eyebrow-cyan, .eyebrow.eyebrow-cyan { color: #27eaf6; }

/* Reusable crisp cyan gradient edge for key panels (no hover needed). */
.glass-edge { position: relative; }
.glass-edge::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(39,234,246,0.75), rgba(39,234,246,0.14) 42%, rgba(1,110,141,0.05) 72%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.glow-cyan { box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 55px -14px rgba(39,234,246,0.3); }

.btn-primary {
  background: #fff; color: #000; border-radius: 999px; padding: 15px 28px;
  font-weight: 800; font-size: 14px; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: transform .2s ease, opacity .2s ease;
}
.btn-primary:hover { transform: translateY(-3px); opacity: .92; }
.btn-secondary {
  background: rgba(39, 234, 246, 0.04); color: rgba(255, 255, 255, 0.88); border-radius: 999px;
  padding: 14px 28px; font-weight: 700; font-size: 14px;
  border: 1px solid rgba(39, 234, 246, 0.4); cursor: pointer;
  box-shadow: 0 0 22px -10px rgba(39, 234, 246, 0.4);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-secondary:hover { transform: translateY(-3px); border-color: rgba(39,234,246,.85); color: #fff; box-shadow: 0 0 28px -6px rgba(39,234,246,.5); }

/* ---- Form fields (ported) ---- */
.field-label { font-size: 13px; font-weight: 500; letter-spacing: .01em; color: rgba(255,255,255,.55); display: block; margin-bottom: 8px; }
.field {
  width: 100%; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.12);
  color: #fff; border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.4;
  outline: none; font-family: inherit;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.field::placeholder { color: rgba(255,255,255,.28); }
.field:hover { border-color: rgba(255,255,255,.2); }
.field:focus { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.05); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
textarea.field { resize: vertical; min-height: 120px; }
select.field { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field option { background: #0c0c0c; color: #fff; }

/* ---- Faint static grid (echo of MeshBackground) ---- */
.mesh-dim {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .025;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 54px 54px;
}

/* ---- Cyan aurora background image, gently drifting. Overscaled so the slow
       drift never reveals an edge. Behind the faint grid. ---- */
.mesh-aurora {
  position: fixed;
  left: -6%; top: -6%; width: 112%; height: 112%;
  z-index: -2; pointer-events: none;
  background: #00070b url('/background.webp') center center / cover no-repeat;
  animation: auroraDrift 32s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(-1%, -0.6%, 0) scale(1.0); }
  100% { transform: translate3d(1.2%, 0.8%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { .mesh-aurora { animation: none; } }

/* ---- Nav (mirrors components/Nav.tsx) ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo img { height: 48px; width: auto; }
.nav__links { display: none; gap: 30px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 14px; color: rgba(255,255,255,.6); transition: color .2s ease; }
.nav__links a:hover, .nav__links a.is-active { color: #fff; }
@media (min-width: 768px) { .nav__links { display: flex; } .nav__cta { display: inline-flex !important; } }
.nav__cta { display: none; }

/* ---- Footer (mirrors components/Footer.tsx) ---- */
.footer { border-top: 1px solid rgba(255,255,255,.1); padding: 32px 0; margin-top: 80px; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 16px; justify-content: space-between; }
.footer p, .footer a { color: rgba(255,255,255,.38); font-size: 13px; }
.footer a:hover { color: #fff; }
.footer__links { display: flex; gap: 24px; }
@media (min-width: 640px) { .footer__inner { flex-direction: row; } }

/* ---- Headings ---- */
.page-title { font-weight: 900; text-transform: uppercase; line-height: .82; letter-spacing: -.09em;
  font-size: clamp(48px, 9vw, 110px); margin: 0; }

/* ---- Post cards grid ---- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 56px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card { display: flex; flex-direction: column; height: 100%; padding: 20px; }
.card__media { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; margin-bottom: 22px; background: rgba(255,255,255,.05); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.05); }
.card__meta { font-size: 12px; color: rgba(255,255,255,.4); margin-bottom: 10px; }
.card__title { font-size: 20px; font-weight: 700; letter-spacing: -.03em; line-height: 1.25; margin: 0 0 10px; }
.card__excerpt { color: rgba(255,255,255,.5); font-size: 14px; line-height: 1.6; flex: 1; }
.card__more { margin-top: 22px; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: rgba(255,255,255,.85); display: inline-flex; gap: 8px; }
.card:hover .card__more { color: #fff; }

/* ---- Single article ---- */
.article-head { max-width: 860px; }
.article-cover { width: 100%; border-radius: 24px; overflow: hidden; margin: 40px 0; }
.article-cover img { width: 100%; object-fit: cover; }
.article { max-width: 760px; margin: 0 auto; color: rgba(255,255,255,.72); font-size: 19px; line-height: 1.8; }
.article h2 { color: #fff; font-weight: 900; letter-spacing: -.05em; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 48px 0 18px; }
.article h3 { color: #fff; font-weight: 800; letter-spacing: -.04em; font-size: clamp(22px, 3vw, 28px); margin: 36px 0 14px; }
.article h4 { color: #fff; font-weight: 700; font-size: 20px; margin: 28px 0 12px; }
.article p { margin: 0 0 24px; }
.article a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.4); }
.article a:hover { text-decoration-color: #fff; }
.article ul, .article ol { margin: 0 0 24px; padding-left: 24px; }
.article li { margin-bottom: 10px; }
.article blockquote { margin: 28px 0; padding: 18px 24px; border-left: 3px solid rgba(255,255,255,.3); color: rgba(255,255,255,.85); font-style: italic; }
.article img { border-radius: 16px; margin: 28px 0; }
.article pre { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 18px; overflow-x: auto; font-size: 14px; }
.article code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.article table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.article th, .article td { border: 1px solid rgba(255,255,255,.12); padding: 10px 14px; text-align: left; }

/* ---- Utility ---- */
.back-link { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.58); font-size: 14px; margin-bottom: 36px; transition: color .2s ease; }
.back-link:hover { color: #fff; }
.pagination { display: flex; gap: 12px; justify-content: center; margin-top: 56px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tag { font-size: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.7); }
.tag:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.muted { color: rgba(255,255,255,.5); }
.center { text-align: center; }
.empty-state { padding: 80px 0; text-align: center; color: rgba(255,255,255,.5); }

/* ---- Admin ---- */
.admin-wrap { max-width: 960px; margin: 0 auto; }
.admin-narrow { max-width: 460px; margin: 0 auto; }
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.admin-table th { color: rgba(255,255,255,.5); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.form-row { margin-bottom: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 768px) { .form-grid { grid-template-columns: 2fr 1fr; align-items: start; } }
.hint { font-size: 12px; color: rgba(255,255,255,.4); margin-top: 6px; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 22px; font-size: 14px; }
.alert-error { background: rgba(255,80,80,.1); border: 1px solid rgba(255,80,80,.3); color: #ffb0b0; }
.alert-success { background: rgba(80,255,140,.08); border: 1px solid rgba(80,255,140,.25); color: #9df5bd; }
.pill { display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .08em; }
.pill-published { background: rgba(80,255,140,.12); color: #9df5bd; }
.pill-draft { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.link-danger { color: #ff9d9d; }
.actions-inline { display: inline-flex; gap: 14px; align-items: center; }
