/* ============================================================================
   Socializo Blog — self-contained stylesheet.
   Ports the light design tokens from tailwind.config.ts so PHP pages match the
   Next.js frontend without Tailwind.
   ============================================================================ */

:root {
  --surface-base: #ffffff;
  --surface-band: #effafc;
  --surface-band2: #f4fbfd;
  --surface-strong: #0d1b2a;
  --ink-heading: #0d1b2a;
  --ink-body: #5b6b7b;
  --ink-inverse: #ffffff;
  --ink-invmuted: #9fb3c8;
  --accent-sky: #32cbeb;
  --accent-deep: #0e7490;
  --accent-deephover: #155e75;
  --accent-wash: #e1f7fb;
  --accent-deepink: #0a6b85;
  --line-subtle: #e2e8f0;
  --line-sky: #c6eef6;
  --line-sky2: #d7f3f9;
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 18px 35px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--surface-base);
  color: var(--ink-body);
  font-family: 'Plus Jakarta Sans', system-ui, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; border-radius: 4px; }

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

/* ---- Card surface (name kept from the old theme for template compatibility) ---- */
.glass {
  background: var(--surface-base);
  border: 1px solid var(--line-subtle);
  box-shadow: var(--shadow-card);
}
.glass-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.glass-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
  border-color: var(--line-sky);
}
.rounded-card { border-radius: 16px; }
.rounded-card-lg { border-radius: 18px; }

.eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-deepink);
}
.eyebrow-cyan, .eyebrow.eyebrow-cyan { color: var(--accent-deepink); }

.btn-primary {
  background: var(--accent-deep); color: var(--ink-inverse); border-radius: 12px; padding: 13px 24px;
  font-weight: 700; font-size: 15px; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, background .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-deephover); }
.btn-secondary {
  background: var(--surface-base); color: var(--ink-heading); border-radius: 12px;
  padding: 12px 24px; font-weight: 700; font-size: 15px;
  border: 1px solid var(--line-subtle); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--accent-sky); color: var(--accent-deepink); }

/* ---- Form fields ---- */
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-heading); display: block; margin-bottom: 8px; }
.field {
  width: 100%; background: var(--surface-base); border: 1px solid var(--line-subtle);
  color: var(--ink-heading); border-radius: 12px; padding: 13px 16px; font-size: 15px; line-height: 1.4;
  outline: none; font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field::placeholder { color: var(--ink-body); opacity: .6; }
.field:hover { border-color: var(--line-sky); }
.field:focus { border-color: var(--accent-deep); box-shadow: 0 0 0 3px var(--accent-wash); }
textarea.field { resize: vertical; min-height: 120px; }
select.field { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field option { background: var(--surface-base); color: var(--ink-heading); }

/* ---- Nav (mirrors components/NavCard.tsx) ---- */
.nav {
  position: sticky; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: 12px;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--surface-base); border: 1px solid var(--line-subtle);
  border-radius: 16px; box-shadow: var(--shadow-float);
  padding: 12px 20px;
}
.nav__logo img { height: 40px; width: auto; }
.nav__links { display: none; gap: 28px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 14px; font-weight: 600; color: var(--ink-heading); transition: color .2s ease; }
.nav__links a:hover, .nav__links a.is-active { color: var(--accent-deepink); }
@media (min-width: 768px) { .nav__links { display: flex; } .nav__cta { display: inline-flex !important; } }
.nav__cta { display: none; }

/* ---- Footer (mirrors components/SiteFooter.tsx) ---- */
.footer { background: var(--surface-strong); padding: 28px 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: var(--ink-invmuted); font-size: 13px; margin: 0; }
.footer a:hover { color: var(--ink-inverse); }
.footer__links { display: flex; gap: 24px; }
@media (min-width: 640px) { .footer__inner { flex-direction: row; } }

/* ---- Headings ---- */
.page-title {
  font-weight: 800; line-height: 1.12; letter-spacing: -.02em;
  color: var(--ink-heading);
  font-size: clamp(32px, 5vw, 50px); margin: 0;
}

/* ---- Post cards grid ---- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 48px; }
@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: 12px; overflow: hidden; margin-bottom: 18px; background: var(--accent-wash); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__meta { font-size: 12px; color: var(--ink-body); margin-bottom: 8px; }
.card__title { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; margin: 0 0 8px; color: var(--ink-heading); }
.card__excerpt { color: var(--ink-body); font-size: 14px; line-height: 1.6; flex: 1; }
.card__more { margin-top: 18px; font-size: 13px; font-weight: 800; color: var(--accent-deepink); display: inline-flex; gap: 8px; }
.card:hover .card__more { text-decoration: underline; text-underline-offset: 4px; }

/* ---- Single article ---- */
.article-head { max-width: 860px; }
.article-cover { width: 100%; border-radius: 16px; overflow: hidden; margin: 40px 0; border: 1px solid var(--line-subtle); }
.article-cover img { width: 100%; object-fit: cover; }
.article { max-width: 760px; margin: 0 auto; color: var(--ink-body); font-size: 18px; line-height: 1.8; }
.article h2 { color: var(--ink-heading); font-weight: 800; letter-spacing: -.02em; font-size: clamp(26px, 3.5vw, 34px); line-height: 1.2; margin: 48px 0 18px; }
.article h3 { color: var(--ink-heading); font-weight: 700; letter-spacing: -.01em; font-size: clamp(21px, 3vw, 26px); margin: 36px 0 14px; }
.article h4 { color: var(--ink-heading); font-weight: 700; font-size: 19px; margin: 28px 0 12px; }
.article p { margin: 0 0 24px; }
.article a { color: var(--accent-deepink); text-decoration: underline; text-underline-offset: 3px; }
.article a:hover { color: var(--accent-deephover); }
.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 var(--accent-sky); background: var(--surface-band2); border-radius: 0 12px 12px 0; color: var(--ink-heading); font-style: italic; }
.article img { border-radius: 12px; margin: 28px 0; border: 1px solid var(--line-subtle); }
.article pre { background: var(--surface-band2); border: 1px solid var(--line-subtle); border-radius: 12px; 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 var(--line-subtle); padding: 10px 14px; text-align: left; }
.article th { color: var(--ink-heading); background: var(--surface-band2); }

/* ---- Utility ---- */
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-deepink); font-weight: 600; font-size: 14px; margin-bottom: 36px; transition: color .2s ease; }
.back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.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; font-weight: 600; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-subtle); color: var(--ink-body); transition: color .2s ease, border-color .2s ease, background .2s ease; }
.tag:hover, .tag.is-active { color: var(--accent-deepink); border-color: var(--line-sky); background: var(--accent-wash); }
.muted { color: var(--ink-body); }
.center { text-align: center; }
.empty-state { padding: 80px 0; text-align: center; color: var(--ink-body); }

/* ---- 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 var(--line-subtle); font-size: 14px; }
.admin-table th { color: var(--ink-body); 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: var(--ink-body); margin-top: 6px; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 22px; font-size: 14px; }
.alert-error { background: #fdf1f1; border: 1px solid #f3c6c6; color: #b42323; }
.alert-success { background: #eefaf2; border: 1px solid #c2ecd2; color: #157a3e; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .08em; }
.pill-published { background: #eefaf2; color: #157a3e; }
.pill-draft { background: var(--surface-band2); color: var(--ink-body); }
.link-danger { color: #b42323; }
.actions-inline { display: inline-flex; gap: 14px; align-items: center; }

/* ---- Motion safety ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
