/*
Theme Name: MUST Services Blog
Theme URI: https://blogs.must.services/
Author: MUST Services
Author URI: https://must.services/
Description: A premium dark theme for the MUST Services blog, matching the must.services brand — teal (#3aa6a6) accent, clean modern typography, translucent sticky header, and card-based layouts. Built for AI / Software / Cloud / Industries / BPO / Insights content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: must-services-blog
Tags: blog, dark, two-columns, custom-logo, custom-menu, featured-images, sticky-post, translation-ready
*/

/* ============================================================
   DESIGN TOKENS — matched to must.services
   ============================================================ */
:root {
  /* Brand */
  --teal:        #3aa6a6;            /* primary (site theme-color) */
  --teal-bright: #5ad1cb;           /* hover / highlight */
  --teal-deep:   #2b8585;
  --teal-glow:   rgba(58, 166, 166, .35);
  --teal-soft:   rgba(58, 166, 166, .12);

  /* Surfaces */
  --bg:          #080c0d;           /* page background */
  --bg-soft:     #0c1213;
  --surface:     #0f1819;           /* cards */
  --surface-2:   #14201f;           /* elevated */
  --border:      rgba(120, 180, 178, .14);
  --border-strong: rgba(120, 180, 178, .30);

  /* Text */
  --text:        #eaf1f1;
  --text-dim:    #9fb0b0;
  --text-faint:  #6f8181;
  --white:       #ffffff;

  /* Type */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --maxw: 1200px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(0,0,0,.7);
  --shadow-glow: 0 0 0 1px var(--border-strong), 0 24px 60px -24px var(--teal-glow);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Atmospheric background: subtle teal gradient mesh + grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 12% -8%, rgba(58,166,166,.16), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(58,166,166,.08), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(58,166,166,.06), transparent 60%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-bright); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--teal); }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-sans);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--white);
  margin: 0 0 .5em;
}

p { margin: 0 0 1.2em; }

::selection { background: var(--teal); color: #04100f; }

/* Accessibility */
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal); color: #04100f;
  padding: 10px 18px; border-radius: 0 0 8px 0;
  font-weight: 700; z-index: 999;
}
.skip-link:focus { left: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Eyebrow label (mono, uppercase) — like must.services section labels */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--teal);
  display: inline-block;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,12,13,.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.site-branding { display: flex; align-items: center; gap: 14px; min-width: 0; }
.custom-logo-link, .site-branding img { display: block; }
.custom-logo { max-height: 42px; width: auto; }
.site-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0;
  white-space: nowrap;
}
.site-title a { color: var(--white); }
.site-title a:hover { color: var(--teal-bright); }

/* Primary nav */
.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
.main-navigation a {
  display: inline-block;
  color: var(--text-dim);
  font-size: .94rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
  color: var(--white);
  background: var(--teal-soft);
}
.main-navigation ul ul {
  display: none;
  position: absolute;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow);
}
.main-navigation li { position: relative; }
.main-navigation li:hover > ul { display: flex; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px; height: 44px;
  border-radius: 12px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ============================================================
   PAGE HEAD / ARCHIVE HERO
   ============================================================ */
.page-hero {
  padding: 72px 0 36px;
  text-align: center;
}
.page-hero .eyebrow { margin-bottom: 18px; }
.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 14px;
}
.page-hero .lead {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 620px;
  margin: 0 auto;
}
.page-hero h1 .accent { color: var(--teal); }

/* ============================================================
   POST GRID (index / archive)
   ============================================================ */
.content-area { padding: 24px 0 80px; }

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

/* Featured (first) post spans wide */
.post-grid .post-card.is-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.post-grid .post-card.is-featured .card-thumb { aspect-ratio: auto; height: 100%; }

.post-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
}
.card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-2);
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .4s var(--ease);
}
.post-card:hover .card-thumb img { transform: scale(1.06); }
.card-thumb::after {
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 40%, rgba(8,12,13,.55) 100%);
  opacity:.6;
}
.card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.is-featured .card-body { padding: 36px 40px; justify-content: center; }

/* Category chips */
.card-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid var(--border-strong);
  padding: 5px 11px;
  border-radius: 999px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.cat-chip:hover { background: var(--teal); color: #04100f; }

.card-title { font-size: 1.32rem; line-height: 1.22; margin: 0; }
.is-featured .card-title { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.card-title a { color: var(--white); }
.card-title a:hover { color: var(--teal-bright); }

.card-excerpt { color: var(--text-dim); font-size: .98rem; margin: 0; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  color: var(--text-faint);
  font-size: .84rem;
  font-family: var(--font-mono);
  letter-spacing: .02em;
}
.card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }
.card-meta a { color: var(--text-faint); }
.card-meta a:hover { color: var(--teal); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-hero { padding: 56px 0 0; }
.single-hero .container { max-width: 820px; }
.single-hero .card-cats { justify-content: center; margin-bottom: 22px; }
.single-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  text-align: center;
  margin-bottom: 22px;
}
.single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: .86rem;
  margin-bottom: 38px;
}
.single-meta .avatar { border-radius: 50%; width: 34px; height: 34px; }
.single-featured {
  max-width: var(--maxw);
  margin: 0 auto 48px;
  padding: 0 24px;
}
.single-featured img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.entry-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px 60px;
  font-size: 1.12rem;
  line-height: 1.85;
  color: #d6e2e2;
}
.entry-content > * { margin-bottom: 1.4em; }
.entry-content h2 { font-size: 1.8rem; margin: 1.8em 0 .6em; color: var(--white); }
.entry-content h3 { font-size: 1.36rem; margin: 1.6em 0 .5em; color: var(--white); }
.entry-content a { color: var(--teal-bright); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--teal-deep); }
.entry-content a:hover { color: var(--teal); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content img { border-radius: var(--radius-sm); margin: 1.6em auto; }
.entry-content blockquote {
  margin: 1.8em 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--teal);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 600;
  font-style: italic;
}
.entry-content code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  color: var(--teal-bright);
}
.entry-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .92rem;
}
.entry-content pre code { background: none; border: none; padding: 0; color: #d6e2e2; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.entry-content th { background: var(--surface-2); color: var(--white); }

/* Tags + share footer */
.entry-footer {
  max-width: 740px;
  margin: 0 auto;
  padding: 26px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.entry-footer .tag-link {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}
.entry-footer .tag-link:hover { border-color: var(--teal); color: var(--teal); }

/* Post navigation */
.post-nav {
  max-width: 740px;
  margin: 48px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.post-nav a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.post-nav a:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.post-nav .label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); display:block; margin-bottom: 6px; }
.post-nav .nav-next { text-align: right; }
.post-nav .title { color: var(--white); font-weight: 700; }

/* ============================================================
   PAGE TEMPLATE (About etc.)
   ============================================================ */
.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 24px 70px;
  font-size: 1.1rem;
  line-height: 1.85;
  color: #d6e2e2;
}
.page-content h2 { font-size: 1.7rem; margin: 1.6em 0 .5em; }

/* ============================================================
   CTA STRIP (matches must.services bottom CTA)
   ============================================================ */
.cta-strip {
  margin: 40px 0 0;
  border-top: 1px solid var(--border);
}
.cta-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.cta-inner h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); max-width: 620px; }
.cta-inner h2 .accent { color: var(--teal); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal);
  color: #04100f;
  font-weight: 800;
  font-size: .98rem;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--teal-bright); color: #04100f; transform: translateY(-2px); box-shadow: 0 14px 34px -12px var(--teal-glow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--teal-soft); color: var(--white); box-shadow: none; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}
.pagination .page-numbers {
  min-width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 700;
  font-size: .95rem;
}
.pagination .page-numbers:hover { border-color: var(--teal); color: var(--teal); }
.pagination .page-numbers.current { background: var(--teal); color: #04100f; border-color: var(--teal); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 56px 0 30px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
}
.footer-brand { max-width: 360px; }
.footer-brand img { max-height: 40px; margin-bottom: 16px; }
.footer-brand p { color: var(--text-dim); font-size: .95rem; }
.footer-social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-social a {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all .25s var(--ease);
}
.footer-social a:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-3px); }
.footer-social svg { width: 19px; height: 19px; fill: currentColor; }
.footer-menu ul { list-style:none; display:flex; gap: 22px; padding:0; margin: 0; flex-wrap: wrap; }
.footer-menu a { color: var(--text-dim); font-weight: 600; font-size: .92rem; }
.footer-menu a:hover { color: var(--teal); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-faint);
  font-size: .86rem;
  font-family: var(--font-mono);
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--teal); }

.scroll-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--teal);
  color: #04100f;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -10px var(--teal-glow);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all .3s var(--ease);
  z-index: 90;
  border: none; cursor: pointer;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top svg { width: 22px; height: 22px; }

/* Reveal-on-load stagger for cards */
.post-card { opacity: 0; transform: translateY(18px); animation: rise .7s var(--ease) forwards; }
.post-card:nth-child(1){ animation-delay:.05s } .post-card:nth-child(2){ animation-delay:.12s }
.post-card:nth-child(3){ animation-delay:.19s } .post-card:nth-child(4){ animation-delay:.26s }
.post-card:nth-child(5){ animation-delay:.33s } .post-card:nth-child(6){ animation-delay:.40s }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .post-card { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1000px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid .post-card.is-featured { grid-template-columns: 1fr; }
  .post-grid .post-card.is-featured .card-thumb { aspect-ratio: 16/9; height: auto; }
  .is-featured .card-body { padding: 26px 28px; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .menu-toggle { display: inline-flex; }
  .main-navigation {
    position: fixed;
    inset: 76px 0 auto 0;
    background: rgba(8,12,13,.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    transition: transform .35s var(--ease);
    padding: 14px 0 22px;
  }
  .main-navigation.is-open { transform: translateY(0); }
  .main-navigation ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 0 16px; }
  .main-navigation a { padding: 13px 16px; border-radius: 12px; }
  .main-navigation ul ul { position: static; box-shadow:none; border:none; padding-left: 14px; }
  .main-navigation li:hover > ul { display:flex; }
}
@media (max-width: 620px) {
  .post-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 0 24px; }
  .cta-inner { padding: 48px 24px; }
  .post-nav { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}
