/* ============================================================
   GUARDEX BLOG — blog.guardextech.com
   Stylesheet: css/blog.css
   ============================================================ */

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

:root {
    --bg:       #060b14;
    --surface:  #0d1526;
    --surface2: #111c33;
    --border:   rgba(59,130,246,0.15);
    --blue:     #3b82f6;
    --blue-dim: rgba(59,130,246,0.12);
    --purple:   #8b5cf6;
    --green:    #22c55e;
    --text:     #e2e8f0;
    --muted:    #64748b;
    --accent:   #60a5fa;
    --font:     'Inter', system-ui, sans-serif;
    --orbitron: 'Orbitron', sans-serif;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }

/* ── Canvas background ── */
#gridCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.bg-glow { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.bg-glow-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(59,130,246,0.07) 0%, transparent 70%); top: -200px; right: -100px; }
.bg-glow-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(139,92,246,0.05) 0%, transparent 70%); bottom: 0; left: -150px; }

/* ── Container ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ── Navbar ── */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(6,11,20,0.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.nav-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { height: 32px; width: auto; }
.logo-text { font-family: var(--orbitron); font-weight: 800; font-size: 1.1rem; color: var(--text); letter-spacing: 2px; }
.blog-badge { background: linear-gradient(135deg, var(--blue), #1d4ed8); color: white; font-size: 0.6rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; letter-spacing: 1px; text-transform: uppercase; }
.nav-links { display: flex; gap: 8px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 0.85rem; padding: 7px 14px; border-radius: 8px; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
.nav-link:hover { color: var(--text); background: var(--blue-dim); }

/* ── Hero ── */
.hero { position: relative; z-index: 1; padding: 90px 24px 60px; max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-content { flex: 1; }
.hero-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--blue-dim); border: 1px solid rgba(59,130,246,0.25); color: var(--accent); padding: 6px 16px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 20px; }
.hero-title { font-family: var(--orbitron); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.1; margin-bottom: 16px; color: var(--text); }
.gradient-text { background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { color: var(--muted); font-size: 1rem; max-width: 480px; margin-bottom: 36px; line-height: 1.7; }
.hero-stats { display: flex; align-items: center; gap: 24px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--orbitron); font-size: 1.8rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero decoration */
.hero-decoration { position: relative; width: 220px; height: 220px; flex-shrink: 0; }
.deco-ring { position: absolute; border-radius: 50%; border: 1px solid; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.ring-1 { width: 200px; height: 200px; border-color: rgba(59,130,246,0.2); animation: rotate 20s linear infinite; }
.ring-2 { width: 150px; height: 150px; border-color: rgba(139,92,246,0.2); animation: rotate 15s linear infinite reverse; }
.ring-3 { width: 100px; height: 100px; border-color: rgba(59,130,246,0.1); animation: rotate 10s linear infinite; }
.deco-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; background: linear-gradient(135deg, var(--blue), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
@keyframes rotate { from { transform: translate(-50%,-50%) rotate(0deg); } to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── Category Filter ── */
.categories-section { position: relative; z-index: 1; padding: 0 0 32px; }
.category-filters { display: flex; gap: 8px; flex-wrap: wrap; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.cat-btn { background: var(--surface); border: 1px solid var(--border); color: var(--muted); padding: 8px 20px; border-radius: 24px; font-size: 0.83rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.cat-btn:hover { color: var(--text); border-color: var(--blue); }
.cat-btn.active { background: var(--blue); border-color: var(--blue); color: white; font-weight: 600; }

/* ── Post Categories ── */
.post-cat { font-size: 0.68rem; font-weight: 700; padding: 3px 10px; border-radius: 12px; letter-spacing: 0.5px; text-transform: uppercase; }
.cat-product { background: rgba(59,130,246,0.15); color: var(--accent); }
.cat-security { background: rgba(139,92,246,0.15); color: #a78bfa; }
.cat-guide { background: rgba(34,197,94,0.15); color: #4ade80; }

/* ── Featured Post ── */
.featured-post { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; cursor: pointer; transition: all 0.3s; overflow: hidden; }
.featured-post::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59,130,246,0.06) 0%, transparent 60%); opacity: 0; transition: opacity 0.3s; border-radius: inherit; pointer-events: none; }
.featured-post:hover::before { opacity: 1; }
.featured-post:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(59,130,246,0.12); }
.featured-badge { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(245,158,11,0.05)); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; margin-bottom: 16px; letter-spacing: 0.5px; }
.featured-body .post-meta { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.post-date, .post-read { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.featured-title { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 700; color: var(--text); margin-bottom: 12px; line-height: 1.3; }
.featured-excerpt { color: var(--muted); font-size: 0.92rem; line-height: 1.7; margin-bottom: 24px; max-width: 700px; }
.featured-footer { display: flex; align-items: center; justify-content: space-between; }
.author { display: flex; align-items: center; gap: 10px; font-size: 0.83rem; color: var(--text); }
.author-avatar { width: 32px; height: 32px; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; color: white; }
.read-more { color: var(--accent); font-size: 0.83rem; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: gap 0.2s; }
.featured-post:hover .read-more { gap: 10px; }

/* ── Blog Grid ── */
.blog-grid-section { padding-bottom: 80px; }
.section-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* ── Post Card ── */
.post-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; cursor: pointer; transition: all 0.3s; display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.post-card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59,130,246,0.07) 0%, transparent 60%); opacity: 0; transition: opacity 0.3s; border-radius: inherit; pointer-events: none; }
.post-card:hover::before { opacity: 1; }
.post-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-3px); box-shadow: 0 16px 48px rgba(0,0,0,0.3); }
.post-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.post-icon-wrap { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.icon-blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.icon-purple { background: rgba(139,92,246,0.15); color: var(--purple); }
.icon-green { background: rgba(34,197,94,0.15); color: var(--green); }
.post-card-body { flex: 1; margin-bottom: 20px; }
.post-meta-sm { display: flex; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 0.74rem; }
.post-meta-sm i { margin-right: 3px; }
.post-title { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.4; margin-bottom: 10px; }
.post-excerpt { color: var(--muted); font-size: 0.83rem; line-height: 1.6; }
.post-card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 16px; }
.author-sm { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.author-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--purple)); }
.arrow-link { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; transition: all 0.2s; }
.post-card:hover .arrow-link { background: var(--blue); color: white; }

/* ── CTA ── */
.cta-section { position: relative; z-index: 1; padding: 0 24px 80px; }
.cta-box { max-width: 600px; margin: 0 auto; background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.08)); border: 1px solid rgba(59,130,246,0.25); border-radius: 20px; padding: 48px 40px; text-align: center; }
.cta-icon { width: 56px; height: 56px; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: white; margin: 0 auto 20px; }
.cta-title { font-size: 1.6rem; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.cta-text { color: var(--muted); margin-bottom: 28px; font-size: 0.92rem; }
.cta-btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--blue), #1d4ed8); color: white; text-decoration: none; padding: 12px 28px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; }
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(59,130,246,0.35); }

/* ── Footer ── */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 28px 24px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-logo { display: flex; align-items: center; text-decoration: none; color: var(--text); font-family: var(--orbitron); font-weight: 700; font-size: 0.9rem; letter-spacing: 2px; }
.footer-copy { color: var(--muted); font-size: 0.8rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero { flex-direction: column; padding: 60px 24px 40px; text-align: center; }
    .hero-subtitle { margin: 0 auto 28px; }
    .hero-stats { justify-content: center; }
    .hero-decoration { display: none; }
    .blog-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: center; }
    .nav-links { display: none; }
}
