/*
Theme Name: Nixers Services
Theme URI: https://nixersservices.com
Author: Nixers Services
Description: Official WordPress theme for Nixers Services blog
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: nixers
*/

/* ─────────────────────────────────────────
   TOKENS & VARIABLES
───────────────────────────────────────── */
:root {
  --blue:        #1B6BEB;
  --blue-dark:   #1457C8;
  --navy:        #0D1B3E;
  --navy-footer: #0A0F1E;
  --teal:        #00B4CC;
  --bg:          #F5F7FA;
  --surface:     #FFFFFF;
  --border:      #E4E9F0;
  --text:        #1A1A2E;
  --muted:       #6B7A99;
  --cta-bg:      #1B3E7A;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-card-hover: 0 8px 28px rgba(27,107,235,0.13);

  --font-head: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --max-w: 1200px;
  --nav-h: 72px;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

/* ─────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
}

.nav-logo svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--blue); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.btn-login {
  padding: 8px 20px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s;
  cursor: pointer;
  background: transparent;
}

.btn-login:hover {
  background: var(--text);
  color: white;
}

/* Hamburger */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  z-index: 999;
  flex-direction: column;
  padding: 32px 24px;
  gap: 24px;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a.active { color: var(--blue); }

/* ─────────────────────────────────────────
   BLOG LISTING — HERO
───────────────────────────────────────── */
.blog-hero {
  text-align: center;
  padding: 72px 24px 48px;
}

.blog-hero .badge {
  display: inline-block;
  padding: 4px 16px;
  border: 1.5px solid var(--text);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 12px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero p {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* Search */
.blog-search {
  display: flex;
  align-items: center;
  max-width: 440px;
  margin: 0 auto;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  gap: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,107,235,0.1);
}

.blog-search svg { color: var(--muted); flex-shrink: 0; }

.blog-search input {
  border: none;
  outline: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  width: 100%;
}

.blog-search input::placeholder { color: var(--muted); }

/* ─────────────────────────────────────────
   BLOG LISTING — GRID
───────────────────────────────────────── */
.blog-listing {
  padding: 0 0 80px;
}

.listing-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 28px;
  gap: 12px;
}

.sort-select {
  padding: 8px 36px 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7A99' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  outline: none;
  transition: border-color 0.2s;
}

.sort-select:focus { border-color: var(--blue); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Blog Card */
.blog-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.blog-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.blog-card__image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #e8eef8, #d0daf0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 2rem;
}

.blog-card__body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card__date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.blog-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.blog-card__read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  transition: gap 0.2s;
}

.blog-card__read:hover { gap: 10px; }

.blog-card__read svg { transition: transform 0.2s; }
.blog-card__read:hover svg { transform: translate(2px, -2px); }

/* ─────────────────────────────────────────
   PAGINATION
───────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 52px;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
  cursor: pointer;
}

.page-num:hover { background: var(--border); color: var(--text); }
.page-num.active { background: var(--blue); color: white; font-weight: 700; }
.page-num.ellipsis { cursor: default; color: var(--muted); }

.page-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ─────────────────────────────────────────
   SINGLE POST — HERO
───────────────────────────────────────── */
.post-hero {
  background: var(--surface);
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.post-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.post-hero-text .post-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 16px;
}

.post-meta-date {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.post-hero-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

/* ─────────────────────────────────────────
   SINGLE POST — CONTENT
───────────────────────────────────────── */
.post-body {
  padding: 64px 0;
}

.post-body-inner {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 48px;
  align-items: start;
}

/* Share sidebar */
.share-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.share-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.share-icons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s;
  cursor: pointer;
  background: var(--surface);
}

.share-btn:hover { border-color: var(--blue); color: var(--blue); background: rgba(27,107,235,0.05); }

/* Post content */
.post-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  line-height: 1.35;
}

.post-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
}

.post-content p {
  font-size: 0.95rem;
  color: #3D4B66;
  line-height: 1.75;
  margin-bottom: 16px;
}

.post-content strong {
  color: var(--text);
  font-weight: 700;
}

.post-content ul {
  margin: 12px 0 16px 0;
  padding-left: 0;
}

.post-content ul li {
  font-size: 0.95rem;
  color: #3D4B66;
  line-height: 1.7;
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
}

.post-content ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.post-content ol {
  padding-left: 20px;
  margin: 12px 0 16px;
}

.post-content ol li {
  font-size: 0.95rem;
  color: #3D4B66;
  line-height: 1.7;
  margin-bottom: 8px;
}

.post-content a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(27,107,235,0.3);
  transition: text-decoration-color 0.2s;
}

.post-content a:hover { text-decoration-color: var(--blue); }

.post-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
  width: 100%;
}

/* CTA Block */
.post-cta {
  background: var(--cta-bg);
  border-radius: var(--radius-lg);
  padding: 52px 48px;
  text-align: center;
  margin: 52px 0;
}

.post-cta h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
}

.post-cta p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 28px;
}

.btn-cta {
  display: inline-block;
  padding: 12px 32px;
  background: var(--blue);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  border: none;
}

.btn-cta:hover { background: var(--blue-dark); transform: translateY(-1px); }

/* ─────────────────────────────────────────
   LATEST POSTS
───────────────────────────────────────── */
.latest-posts {
  padding: 60px 0 80px;
  background: var(--bg);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 28px;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  background: var(--navy-footer);
  color: white;
  padding: 56px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand .nav-logo { color: white; margin-bottom: 0; }
.footer-brand .nav-logo svg path { stroke: var(--teal); }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: white; }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
}

.footer-contact-item svg { flex-shrink: 0; color: rgba(255,255,255,0.5); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ─────────────────────────────────────────
   EMPTY STATE
───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  grid-column: 1 / -1;
}

.empty-state svg { color: var(--border); margin: 0 auto 20px; }
.empty-state p { color: var(--muted); font-size: 0.95rem; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .posts-grid, .latest-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links, .nav-right { display: none; }
  .nav-burger { display: flex; }

  .blog-hero { padding: 48px 16px 36px; }

  .posts-grid, .latest-grid { grid-template-columns: 1fr; }

  .post-hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .post-hero-image { height: 220px; }

  .post-body-inner { grid-template-columns: 1fr; }
  .share-sidebar { position: static; }
  .share-icons { flex-direction: row; flex-wrap: wrap; }

  .post-cta { padding: 36px 24px; }

  .pagination { justify-content: center; }
  .pagination-numbers { display: none; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .blog-hero h1 { font-size: 1.5rem; }
}
