/* ============================================================
   SECHPOINT BLOG — Brand-Aligned Stylesheet
   Uses the same design tokens as the main Sechpoint site.
   ============================================================ */

:root {
  --bg-deep:        #FFFFFF;
  --bg-primary:     #F5F8FB;
  --bg-secondary:   #EBF0F6;
  --bg-card:        rgba(255, 255, 255, 0.88);
  --bg-card-hover:  rgba(255, 255, 255, 0.98);
  --cyan:           #0099BB;
  --cyan-dim:       rgba(0, 153, 187, 0.08);
  --cyan-glow:      rgba(0, 153, 187, 0.35);
  --violet:         #7C3AED;
  --violet-dim:     rgba(124, 58, 237, 0.08);
  --magenta:        #E91E8C;
  --blue:           #0057B8;
  --blue-light:     #3B82F6;
  --emerald:        #059669;
  --text-primary:   #0F172A;
  --text-secondary: #334E68;
  --text-muted:     #64748B;
  --border:         rgba(0, 153, 187, 0.15);
  --border-hover:   rgba(0, 153, 187, 0.45);
  --gradient-cyan:  linear-gradient(135deg, #00AADD, #0057B8);
  --gradient-hero:  linear-gradient(135deg, #00AADD 0%, #7C3AED 55%, #E91E8C 100%);
  --shadow-card:    0 8px 48px rgba(0, 0, 0, 0.08);
  --shadow-glow:    0 0 60px rgba(0, 153, 187, 0.18);
  --shadow-neon:    0 0 20px rgba(0,153,187,0.2), 0 0 50px rgba(124,58,237,0.1), 0 0 80px rgba(233,30,140,0.06);
  --blur-glass:     blur(18px);
  --radius:         12px;
  --radius-lg:      20px;
  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width:      1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--gradient-cyan); border-radius: 3px; }

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

/* ── Keyframes ── */
@keyframes shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  25%       { transform: translate(50px,-60px) scale(1.06); }
  50%       { transform: translate(-30px,35px) scale(0.96); }
  75%       { transform: translate(28px,-22px) scale(1.03); }
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 8px var(--cyan), 0 0 22px rgba(0,153,187,0.7); }
  50%       { opacity: 0.4; transform: scale(1.6); box-shadow: 0 0 4px var(--cyan), 0 0 10px rgba(0,153,187,0.3); }
}

/* ── Gradient Text ── */
.gradient-text {
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}

/* ── Buttons ── */
.btn-primary, .btn-secondary, .btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  text-decoration: none; padding: 14px 28px; border-radius: var(--radius);
  border: none; cursor: pointer; transition: var(--transition);
}
.btn-primary {
  background: var(--gradient-cyan); color: #fff;
  box-shadow: 0 4px 24px rgba(0,153,187,0.35), 0 0 0 1px rgba(0,153,187,0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0,153,187,0.5), 0 0 80px rgba(0,153,187,0.15);
}
.btn-primary:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
}
.btn-secondary {
  background: rgba(0,153,187,0.07); color: var(--cyan);
  border: 1.5px solid rgba(0,153,187,0.35);
  backdrop-filter: var(--blur-glass);
}
.btn-secondary:hover {
  background: rgba(0,153,187,0.14); transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0,153,187,0.2);
}
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border); font-size: 14px; padding: 12px 24px;
}
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 20px rgba(0,153,187,0.12); }
.btn-sm { font-size: 13px; padding: 10px 20px; }


/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0; transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0,153,187,0.12);
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-width); margin: 0 auto; padding: 20px 24px;
}
.nav-logo { text-decoration: none; }
.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.5px;
}
.logo-accent {
  background: var(--gradient-hero);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 5s linear infinite;
}
.nav-links { display: flex; list-style: none; gap: 4px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; padding: 8px 16px; border-radius: 8px; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: rgba(0,153,187,0.07); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text-primary); padding: 8px 12px; border-radius: 8px;
  cursor: pointer; font-size: 18px; transition: var(--transition);
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Mobile Menu ── */
.mobile-menu {
  display: none; position: fixed; inset: 0;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  z-index: 999; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Space Grotesk', sans-serif; font-size: 28px; font-weight: 700;
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.mobile-menu a:hover { color: var(--cyan); text-shadow: 0 0 20px rgba(0,153,187,0.3); }
.mobile-close {
  position: absolute; top: 24px; right: 24px; background: none;
  border: 1px solid var(--border); color: var(--text-primary); padding: 8px 14px;
  border-radius: 8px; cursor: pointer; font-size: 18px; transition: var(--transition);
}
.mobile-close:hover { border-color: var(--cyan); color: var(--cyan); }


/* ================================================================
   BLOG HERO
   ================================================================ */
.blog-hero {
  position: relative; min-height: 40vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-deep); overflow: hidden; padding-top: 80px;
}
.hero-orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  animation: orbFloat 14s ease-in-out infinite;
}
.orb-1 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(0,170,220,0.20) 0%, transparent 65%);
  top: -150px; left: -120px; animation-delay: 0s;
}
.orb-2 {
  width: 650px; height: 650px;
  background: radial-gradient(circle, rgba(124,58,237,0.16) 0%, transparent 65%);
  top: -50px; right: -200px; animation-delay: -5s;
}
.orb-3 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(233,30,140,0.12) 0%, transparent 65%);
  bottom: -80px; left: 25%; animation-delay: -10s;
}
.hero-grid-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,153,187,0.25) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  opacity: 0.35;
}
.hero-bg-gradient {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 50% 65%, rgba(255,255,255,0.55) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--cyan); background: rgba(0,153,187,0.08);
  border: 1px solid rgba(0,153,187,0.3); border-radius: 100px;
  padding: 8px 22px; margin-bottom: 32px;
  box-shadow: 0 0 30px rgba(0,153,187,0.1), inset 0 1px 0 rgba(255,255,255,0.6);
}
.hero-badge::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 24px rgba(0,153,187,0.8);
  animation: livePulse 2s infinite;
}
.blog-hero-content {
  position: relative; z-index: 4;
  text-align: center; padding: 60px 24px 40px;
}
.blog-hero-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700; line-height: 1.08;
  color: var(--text-primary); margin-bottom: 20px;
  letter-spacing: -1.5px;
}
.hero-sub {
  font-size: clamp(15px, 1.8vw, 18px); color: var(--text-secondary);
  line-height: 1.7; max-width: 540px; margin: 0 auto;
}


/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.main-content {
  flex: 1;
  /* Hero sections clear the fixed navbar themselves; pages without a hero
     (single post, admin login) apply their own top padding below. */
}


/* ================================================================
   POST LIST (Landing Page)
   ================================================================ */
.blog-posts { padding: 60px 0 100px; }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.post-card {
  background: var(--bg-card); backdrop-filter: var(--blur-glass); -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(0,153,187,0.1); border-radius: var(--radius-lg);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  position: relative; overflow: hidden;
}
.post-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient-hero); background-size: 200% auto;
  opacity: 0; transition: opacity 0.4s ease;
}
.post-card:hover {
  border-color: rgba(0,153,187,0.45); transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(0,153,187,0.25), 0 20px 60px rgba(0,0,0,0.1), 0 0 50px rgba(0,153,187,0.08), 0 0 30px rgba(124,58,237,0.05);
}
.post-card:hover::before { opacity: 1; }
.post-card-body { padding: 32px; }
.post-date {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}
.event-location {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600; color: var(--cyan);
  margin-bottom: 10px;
}
.post-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px; font-weight: 700; line-height: 1.3;
  margin-bottom: 12px;
}
.post-title a {
  color: var(--text-primary); text-decoration: none; transition: var(--transition);
}
.post-title a:hover { color: var(--cyan); }
.post-excerpt {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 16px;
}
.post-read-more {
  font-size: 14px; font-weight: 600; color: var(--cyan);
  text-decoration: none; transition: var(--transition);
}
.post-read-more:hover { gap: 12px; text-shadow: 0 0 12px rgba(0,153,187,0.3); }


/* ================================================================
   SINGLE POST
   ================================================================ */
.single-post { padding: 40px 0 100px; }
.post-header {
  margin-bottom: 40px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.post-back {
  display: inline-block; font-size: 14px; font-weight: 600; color: var(--text-muted);
  text-decoration: none; margin-bottom: 24px; transition: var(--transition);
}
.post-back:hover { color: var(--cyan); }
.post-header .post-date {
  font-size: 13px; margin-bottom: 16px;
}
.post-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700; line-height: 1.15;
  color: var(--text-primary); letter-spacing: -1px;
}
.post-content {
  font-size: 17px; line-height: 1.85; color: var(--text-secondary);
  max-width: 780px;
}
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-primary); margin: 32px 0 16px; line-height: 1.25;
}
.post-content h1 { font-size: 32px; }
.post-content h2 { font-size: 26px; }
.post-content h3 { font-size: 22px; }
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol { margin: 0 0 20px 24px; }
.post-content li { margin-bottom: 8px; }
.post-content a { color: var(--cyan); text-decoration: underline; }
.post-content a:hover { color: var(--violet); }
.post-content blockquote {
  border-left: 3px solid var(--cyan); padding: 16px 24px; margin: 24px 0;
  background: var(--cyan-dim); border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic; color: var(--text-primary);
}
.post-content code {
  background: var(--bg-secondary); padding: 2px 8px; border-radius: 4px;
  font-size: 0.9em; font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.post-content pre {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; overflow-x: auto;
  margin: 24px 0;
}
.post-content pre code { background: none; padding: 0; }
.post-content img {
  max-width: 100%; height: auto; border-radius: var(--radius);
  margin: 24px 0; border: 1px solid var(--border);
}
.post-content hr {
  border: none; border-top: 1px solid var(--border); margin: 32px 0;
}
.post-footer { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }


/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
  text-align: center; padding: 80px 24px;
}
.empty-icon { color: var(--text-muted); margin-bottom: 24px; opacity: 0.5; }
.empty-state h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px;
}
.empty-state p { font-size: 15px; color: var(--text-secondary); }


/* ================================================================
   TAB NAVIGATION
   ================================================================ */
.tab-nav {
  display: flex; gap: 0; border-bottom: 2px solid var(--border);
  margin-bottom: 24px; overflow-x: auto;
}
.tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  margin-bottom: -2px; padding: 12px 24px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--cyan); border-bottom-color: var(--cyan);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ================================================================
   ADMIN / EDITOR
   ================================================================ */
.admin-layout { padding: 116px 0 100px; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.admin-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px; font-weight: 700; color: var(--text-primary);
}
.admin-grid {
  display: grid; grid-template-columns: 300px 1fr;
  gap: 24px; align-items: start;
}

/* ── Sidebar ── */
.admin-sidebar {
  background: var(--bg-card); backdrop-filter: var(--blur-glass); -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(0,153,187,0.1); border-radius: var(--radius-lg);
  overflow: hidden;
}
.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.sidebar-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text-primary);
}
.post-list { max-height: 60vh; overflow-y: auto; }
.post-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid rgba(0,153,187,0.06);
  transition: var(--transition); cursor: default;
}
.post-list-item:hover { background: var(--cyan-dim); }
.post-list-item.active { background: rgba(0,153,187,0.12); border-left: 3px solid var(--cyan); }
.pli-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pli-title { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pli-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.pli-draft { font-size: 10px; font-weight: 700; color: var(--magenta); text-transform: uppercase; letter-spacing: 0.5px; }
.pli-actions { flex-shrink: 0; }
.pli-edit { font-size: 16px; color: var(--text-muted); text-decoration: none; padding: 4px 8px; border-radius: 4px; transition: var(--transition); }
.pli-edit:hover { color: var(--cyan); background: rgba(0,153,187,0.1); }
.empty-posts { padding: 32px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ── Editor ── */
.admin-editor {
  background: var(--bg-card); backdrop-filter: var(--blur-glass); -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(0,153,187,0.1); border-radius: var(--radius-lg);
  padding: 32px;
}
.editor-field { margin-bottom: 24px; }
.editor-field label {
  display: block; font-size: 11px; font-weight: 700; color: var(--text-muted);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px;
}
.editor-field input[type="text"],
.editor-field textarea {
  width: 100%; background: rgba(248, 250, 252, 0.95);
  border: 1.5px solid rgba(0,153,187,0.15);
  border-radius: var(--radius); color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 15px;
  padding: 13px 16px; transition: var(--transition); outline: none;
}
.editor-field textarea { resize: vertical; }
.editor-field input:focus, .editor-field textarea:focus {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,153,187,0.08), 0 0 20px rgba(0,153,187,0.08);
}

/* ── Quill overrides ── */
#quillEditor {
  background: rgba(248, 250, 252, 0.95);
  border: 1.5px solid rgba(0,153,187,0.15);
  border-radius: var(--radius);
  min-height: 350px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
}
.ql-toolbar {
  border: 1.5px solid rgba(0,153,187,0.15) !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  background: var(--bg-secondary);
  font-family: 'Inter', sans-serif;
}
.ql-container { border: none !important; }
.ql-editor { min-height: 350px; }
.ql-editor.ql-blank::before { color: var(--text-muted) !important; }
.ql-editor h1, .ql-editor h2, .ql-editor h3 {
  font-family: 'Space Grotesk', sans-serif; color: var(--text-primary);
}
.ql-editor img { max-width: 100%; border-radius: var(--radius); }

/* ── Editor actions ── */
.editor-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border);
}
.publish-toggle {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  cursor: pointer;
}
.publish-toggle input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--cyan); cursor: pointer;
}
.editor-buttons { display: flex; gap: 12px; }
.editor-status {
  margin-top: 16px; font-size: 14px; font-weight: 600; text-align: center;
}
.editor-status.success { color: var(--emerald); }
.editor-status.error { color: var(--magenta); }

/* ── Upload area ── */
.upload-area {
  margin-top: 24px; display: flex; justify-content: center;
}


/* ================================================================
   UNAUTHORIZED
   ================================================================ */
.unauthorized { padding: 80px 0; }
.unauthorized-hint {
  margin-top: 16px; font-size: 13px; color: var(--text-muted);
  word-break: break-all;
}
.unauthorized-hint code {
  background: var(--bg-secondary); padding: 2px 8px; border-radius: 4px;
  font-size: 13px;
}


/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(0,153,187,0.08);
  padding: 32px 0;
}
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p { font-size: 13px; color: var(--text-muted); }
.footer-bottom a { color: var(--cyan); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-sidebar { order: 2; }
  .admin-editor { order: 1; }
  .post-list { max-height: 300px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }

  .posts-grid { grid-template-columns: 1fr; }
  .post-card-body { padding: 24px; }

  .blog-hero { min-height: 30vh; }
  .orb-1, .orb-2, .orb-3 { opacity: 0.5; }

  .admin-editor { padding: 20px; }
  .editor-actions { flex-direction: column; gap: 16px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* No-hero pages: clear the fixed navbar */
.single-post { padding-top: 120px; }
@media (max-width: 768px) {
  .single-post { padding-top: 100px; }
  .admin-layout { padding-top: 96px; }
}
