/*
Theme Name: Guardian Gaze WP
Theme URI: https://guardiangaze.com
Author: RedSecLabs
Author URI: https://redseclabs.com
Description: Official WordPress theme for Guardian Gaze WP — AI-powered security scanner by RedSecLabs.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guardian-gaze-wp
Tags: blog, custom-menu, featured-images, threaded-comments
*/

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&display=swap');

/* ── TOKENS ── */
:root {
  --white: #fff;
  --off-white: #f8f8fc;
  --surface: #f2f2f8;
  --surface-2: #eaeaf2;
  --border: #e2e2ec;
  --border-dark: #d0d0e0;
  --ink: #0f0f1a;
  --ink-2: #2d2d42;
  --ink-3: #5a5a78;
  --ink-4: #8888aa;
  --purple: #7c3aed;
  --purple-light: rgba(124,58,237,0.08);
  --purple-mid: #7c3aed;
  --purple-dark: #7c3aed;
  --purple-glow: rgba(124,58,237,.12);
  --green: #16a34a;
  --green-light: #dcfce7;
  --amber: #d97706;
  --amber-light: #fef3c7;
  --red: #dc2626;
  --red-light: #fee2e2;
  --blue: #2563eb;
  --blue-light: #dbeafe;
}

/* ── RESET ── */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', sans-serif;
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--purple-mid); border-radius: 2px; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 60px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  /* display: flex; align-items: center; gap: 9px; */
  font-weight: 700; font-size: 17px; color: var(--ink);
  text-decoration: none; letter-spacing: -.02em;
}
.nav-logo-icon {
  /* width: 30px; height: 30px; border-radius: 7px; */
  /* background: linear-gradient(135deg, var(--purple), var(--purple-dark)); */
  /* display: flex; align-items: center; justify-content: center; */
  /* color: #fff; */
}
/* .nav-logo-icon svg { width: 16px; height: 16px; } */
.nav-logo span { color: var(--purple); }

/* WordPress nav menu override */
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links ul { display: flex; gap: 2px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links ul li a {
  font-size: 14px; font-weight: 500; color: var(--ink-3);
  text-decoration: none; padding: 6px 13px; border-radius: 6px; transition: .15s; display: block;
}
.nav-links ul li a:hover { color: var(--ink); background: var(--surface); }
.nav-links ul li.current-menu-item > a,
.nav-links ul li.current-page-ancestor > a,
.nav-links ul li.current-menu-ancestor > a { color: var(--purple); }

.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-signin {
  font-size: 13.5px; font-weight: 600; color: var(--ink-3);
  text-decoration: none; padding: 7px 16px; border-radius: 6px;
  border: 1px solid var(--border); transition: .15s;
}
.nav-signin:hover { color: var(--ink); border-color: var(--border-dark); background: var(--surface); }
.nav-cta {
  font-size: 13.5px; font-weight: 700; color: #fff;
  text-decoration: none; padding: 8px 18px; border-radius: 6px;
  background: var(--purple); box-shadow: 0 1px 3px rgba(124,58,237,.3); transition: .15s;
}
.nav-cta:hover { background: var(--purple-dark); }

.nav-mobile-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--ink-3); padding: 8px; border-radius: 6px; transition: .15s; align-items: center; justify-content: center;
}
.nav-mobile-toggle:hover { color: var(--ink); background: var(--surface); }
.nav-mobile-toggle svg { width: 20px; height: 20px; display: block; }

.nav-mobile-menu {
  display: none; position: fixed; top: 60px; left: 0; right: 0;
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px; z-index: 499; flex-direction: column; gap: 4px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-mobile-menu ul li a {
  font-size: 15px; font-weight: 500; color: var(--ink-3);
  text-decoration: none; padding: 10px 12px; border-radius: 8px; transition: .15s; display: block;
}
.nav-mobile-menu ul li a:hover,
.nav-mobile-menu ul li.current-menu-item > a { color: var(--purple); background: var(--purple-light); }
.nav-mobile-divider { height: 1px; background: var(--border); margin: 8px 0; }
.nav-mobile-btns { display: flex; gap: 8px; margin-top: 4px; }
.nav-mobile-btns .nav-signin,
.nav-mobile-btns .nav-cta { flex: 1; text-align: center; }

/* ── ANIMATIONS ── */
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ── PAGE HERO ── */
.page-hero {
  padding: 120px 48px 64px; text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--purple-glow), transparent 70%);
  pointer-events: none;
}
.pg-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--purple-light); color: var(--purple);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 13px; border-radius: 20px; margin-bottom: 20px;
  border: 1px solid rgba(124,58,237,.2); animation: up .5s ease both;
}
.page-hero h1 {
  font-family: 'Roboto', sans-serif;
  font-size: clamp(34px, 5vw, 64px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.05;
  color: var(--ink); margin-bottom: 16px; animation: up .5s .1s ease both;
}
.page-hero h1 em { font-style: italic; color: var(--purple); font-weight: 700; }
.page-hero > p {
  font-size: 17px; color: var(--ink-3); line-height: 1.75;
  max-width: 580px; margin: 0 auto; animation: up .5s .2s ease both;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--purple); color: #fff;
  padding: 13px 26px; border-radius: 8px; font-weight: 700; font-size: 14.5px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(124,58,237,.3), 0 4px 16px rgba(124,58,237,.2);
  transition: .2s;
}
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-1px); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--ink-2); padding: 13px 22px; border-radius: 8px; font-weight: 600; font-size: 14.5px;
  text-decoration: none; border: 1.5px solid var(--border); transition: .2s; background: var(--white);
}
.btn-outline:hover { border-color: var(--border-dark); background: var(--surface); }

/* ── BLOG CATEGORY FILTER ── */
.blog-cats {
  max-width: 1080px; margin: 0 auto; padding: 0 48px 48px;
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.blog-cat {
  padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); color: var(--ink-3); cursor: pointer; transition: .15s;
  text-decoration: none; display: inline-block;
}
.blog-cat:hover,
.blog-cat.active,
.blog-cat.current-cat { background: var(--purple-light); color: var(--purple); border-color: rgba(124,58,237,.2); }

/* ── BLOG GRID ── */
.blog-grid {
  max-width: 1080px; margin: 0 auto; padding: 0 48px 96px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.blog-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; transition: .2s; cursor: pointer; text-decoration: none; display: block;
}
.blog-card:hover {
  border-color: var(--border-dark); transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.07);
}
.bc-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--purple-light), #7c3aed);
  display: flex; align-items: center; justify-content: center;
  position: relative; border-bottom: 1px solid var(--border); color: var(--purple); overflow: hidden;
}
.bc-thumb svg { width: 48px; height: 48px; opacity: .65; }
.bc-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.bc-tag {
  position: absolute; bottom: 10px; left: 12px;
  background: var(--purple-light); color: var(--purple);
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: .04em; z-index: 1;
}
.bc-body { padding: 20px; }
.bc-date { font-size: 11px; color: var(--ink-4); margin-bottom: 7px; font-weight: 500; }
.bc-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 7px; line-height: 1.4; }
.bc-desc { font-size: 13px; color: var(--ink-4); line-height: 1.6; margin-bottom: 14px; }
.bc-link {
  font-size: 13px; font-weight: 700; color: var(--purple);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: gap .15s;
}
.bc-link:hover { gap: 8px; }

/* No posts */
.no-posts {
  grid-column: 1 / -1; text-align: center; padding: 64px 24px; color: var(--ink-3);
}
.no-posts h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--ink-2); }

/* ── SINGLE POST ── */
.post-container { max-width: 760px; margin: 0 auto; padding: 100px 48px 96px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-3);
  text-decoration: none; margin-bottom: 32px; transition: .15s;
}
.back-link:hover { color: var(--purple); }
.back-link svg { width: 16px; height: 16px; }
.post-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.post-cat-tag {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 5px;
  background: var(--purple-light); color: var(--purple);
  text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
}
.post-title {
  font-size: clamp(26px, 4vw, 44px); font-weight: 700;
  letter-spacing: -.02em; line-height: 1.1; color: var(--ink); margin-bottom: 20px;
}
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-4); flex-wrap: wrap; }
.post-meta-divider { color: var(--border-dark); }
.post-featured-img {
  width: 100%; border-radius: 12px; margin: 32px 0 40px;
  object-fit: cover; max-height: 480px; display: block;
}
.post-content { font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.post-content h2 { font-size: 26px; font-weight: 700; margin: 40px 0 16px; color: var(--ink); letter-spacing: -.01em; }
.post-content h3 { font-size: 20px; font-weight: 700; margin: 32px 0 12px; color: var(--ink); }
.post-content h4 { font-size: 17px; font-weight: 700; margin: 24px 0 10px; color: var(--ink); }
.post-content p { margin-bottom: 20px; }
.post-content a { color: var(--purple); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul, .post-content ol { margin: 0 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content blockquote {
  margin: 32px 0; padding: 20px 24px;
  border-left: 3px solid var(--purple);
  background: var(--purple-light); border-radius: 0 8px 8px 0;
  color: var(--ink-2); font-style: italic;
}
.post-content code {
  font-family: 'Roboto Mono', monospace; font-size: 13.5px;
  background: var(--surface); color: var(--purple-dark); padding: 2px 6px; border-radius: 4px;
}
.post-content pre {
  background: var(--ink); border-radius: 10px; padding: 24px;
  overflow-x: auto; margin-bottom: 20px;
}
.post-content pre code { background: none; color: rgba(255,255,255,.8); padding: 0; font-size: 13px; }
.post-content img { max-width: 100%; border-radius: 8px; margin: 8px 0 20px; display: block; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
.post-content th { background: var(--surface); padding: 10px 14px; text-align: left; font-weight: 700; border: 1px solid var(--border); }
.post-content td { padding: 10px 14px; border: 1px solid var(--border); }

/* ── GENERIC PAGE ── */
.page-content { max-width: 760px; margin: 0 auto; padding: 100px 48px 96px; }
.page-content h1 { font-size: 36px; font-weight: 700; margin-bottom: 24px; color: var(--ink); }

/* ── FOOTER ── */
footer { background: var(--ink); color: rgba(255,255,255,.55); }
.ft-cta-band { border-bottom: 1px solid rgba(255,255,255,.06); }
.ft-cta-inner {
  max-width: 1100px; margin: 0 auto; padding: 36px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.ft-cta-left { display: flex; align-items: center; gap: 16px; }
.ft-cta-icon {
  width: 44px; height: 44px; border-radius: 11px;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: 0 4px 20px #7c3aed; flex-shrink: 0;
}
.ft-cta-icon svg { width: 22px; height: 22px; }
.ft-cta-title { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.ft-cta-sub { font-size: 13px; color: rgba(255,255,255,.4); margin-top: 2px; }
.ft-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.ft-btn-primary {
  padding: 10px 22px; border-radius: 7px; background: var(--purple); color: #fff;
  font-weight: 700; font-size: 13.5px; text-decoration: none; transition: .15s;
  box-shadow: 0 2px 10px rgba(124,58,237,.3);
}
.ft-btn-primary:hover { background: var(--purple-dark); }
.ft-btn-ghost {
  padding: 10px 22px; border-radius: 7px; border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7); font-weight: 600; font-size: 13.5px; text-decoration: none; transition: .15s;
}
.ft-btn-ghost:hover { border-color: rgba(255,255,255,.3); color: #fff; background: rgba(255,255,255,.04); }

.ft-main { padding: 56px 0 0; }
.ft-main-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 48px;
  display: grid; grid-template-columns: 1.4fr 2fr; gap: 64px;
} 
.ft-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 16px; }
.ft-logo-icon {
  /* width: 34px; height: 34px; border-radius: 9px; */
  /* background: linear-gradient(135deg, var(--purple), var(--purple-dark)); */
  /* display: flex; align-items: center; justify-content: center; */
  /* color: #fff; box-shadow: 0 2px 10px rgba(124,58,237,.3); flex-shrink: 0; */
}
/* .ft-logo-icon svg { width: 17px; height: 17px; } */
.ft-logo-text { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.ft-logo-text span { color: var(--purple-mid); }
.ft-brand-desc { font-size: 13.5px; color: rgba(255,255,255,.4); line-height: 1.75; max-width: 280px; margin-bottom: 20px; }
.ft-trust-row { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ft-trust-pill {
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 5px;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.08);
}
.ft-socials { display: flex; gap: 8px; }
.ft-social {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4); text-decoration: none; transition: .15s;
}
.ft-social:hover { border-color: rgba(255,255,255,.25); color: #fff; background: rgba(255,255,255,.07); }
.ft-social svg { width: 15px; height: 15px; }

.ft-links-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.ft-col h5 {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.25); margin-bottom: 16px;
}
.ft-col a {
  display: block; font-size: 13.5px; color: rgba(255,255,255,.5);
  text-decoration: none; margin-bottom: 11px; transition: .15s;
}
.ft-col a:hover { color: rgba(255,255,255,.9); }

.ft-bottom { margin-top: 48px; border-top: 1px solid rgba(255,255,255,.06); padding: 24px 0 28px; }
.ft-bottom-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.ft-bottom p { font-size: 12.5px; color: rgba(255,255,255,.2); }
.ft-bottom a { color: rgba(255,255,255,.3); text-decoration: none; transition: .15s; }
.ft-bottom a:hover { color: rgba(255,255,255,.6); }
.ft-bottom-links { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.ft-bottom-links a { color: rgba(255,255,255,.25); }
.ft-bottom-links a:hover { color: rgba(255,255,255,.6); }
.ft-dot { color: rgba(255,255,255,.12); }

/* ── WORDPRESS ADMIN BAR OFFSET ── */
/* Shifts the fixed nav down when the WP admin bar is visible (logged-in users only).
   Regular visitors never see the admin bar, so this has zero effect on the live site. */
.admin-bar nav {
  top: 32px;
}
.admin-bar .nav-mobile-menu {
  top: calc(60px + 32px);
}
@media screen and (max-width: 782px) {
  .admin-bar nav {
    top: 46px;
  }
  .admin-bar .nav-mobile-menu {
    top: calc(60px + 46px);
  }
}

/* ── RESPONSIVE ── */
@media(max-width: 1000px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .page-hero { padding: 100px 20px 48px; }
  .blog-grid { grid-template-columns: 1fr 1fr; padding: 0 20px 64px; }
  .blog-cats { padding: 0 20px 32px; }
  .ft-cta-inner { padding: 28px 20px; flex-direction: column; align-items: flex-start; }
  .ft-main-inner { grid-template-columns: 1fr; padding: 0 20px; gap: 40px; }
  .ft-links-group { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ft-bottom-inner { padding: 0 20px; flex-direction: column; align-items: flex-start; }
  .post-container { padding: 90px 20px 64px; }
  .page-content { padding: 90px 20px 64px; }
}
@media(max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
}
@media(max-width: 480px) {
  .ft-links-group { grid-template-columns: 1fr; }
}
