/*
Theme Name: KnowFuss Core
Author: KnowFuss Editorial
Description: Minimal, editorial-first publication theme.
Version: 1.0 (clean)
*/

/* =====================
   BASE
   ===================== */

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: #111;
  line-height: 1.6;
  background-color: #f5f6f7; /* light neutral grey base */
  padding-top: 64px; /* space for fixed header */
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =====================
   HEADER
   ===================== */

.nf-site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  background: #ffffff;
  border-bottom: 1px solid #e6e6e6;
}

.nf-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;

  display: flex;
  align-items: center;
  justify-content: space-between;
}



.nf-site-brand a {
  font-size: 1.4rem;
  font-weight: 600;
  color: #111;
}

.nf-site-nav ul {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nf-site-nav a {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #444;
}



/* === HEADER — DESKTOP HEIGHT TIGHTENING === */
.nf-header-inner {
  padding: 0.30rem 1rem;   /* was larger — reduces height */
  align-items: center;
}

/* Logo line-height control */
.nf-site-logo {
  max-height: 30px;        /* slightly smaller */
  height: auto;
}

/* Kill extra vertical stretch */
.nf-site-title a {
  line-height: 1;
}


/* =====================
   DROPDOWN
   ===================== */

/* === NAV DROPDOWN (STRICT HOVER) === */

.nf-site-nav li {
  position: relative;
}

.nf-site-nav .nf-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  min-width: 180px;
  z-index: 1000;
}

.nf-site-nav li:hover > .nf-dropdown {
  display: block;
}
/* =====================
   MAIN CONTAINER
   ===================== */

.nf-article-container {
  max-width: 800px;
  margin: 2rem auto 3rem;
  padding: 40px 24px;

  background: #ffffff;
  border-radius: 4px;
}

/* =====================
   HOMEPAGE
   ===================== */

.nf-home-intro h1 {
  font-size: 1.9rem;
  margin-bottom: 1rem;
}

.nf-home-intro p {
  margin-bottom: 1rem;
}

.nf-section-heading {
  font-size: 1.4rem;
  margin: 3rem 0 1.5rem;
}

/* =====================
   ARTICLES GRID
   ===================== */

/* === HOMEPAGE LATEST ARTICLES GRID FIX === */

.nf-articles-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.nf-article-card {
  background: #ffffff;
  border: 1px solid #eee;
}

.nf-article-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nf-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.nf-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nf-card-body {
  padding: 1rem;
}

.nf-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.nf-card-date {
  font-size: 0.85rem;
  color: #666;
}

/* =====================
   SINGLE ARTICLE
   ===================== */

.nf-article-title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.nf-article-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.nf-article-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.nf-article-content p {
  margin-bottom: 1.2rem;
}

.nf-article-content h2 {
  margin: 2rem 0 1rem;
}

/* =====================
   FOOTER
   ===================== */

.nf-site-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  padding: 2rem 1rem;
  border-top: 1px solid #eee;
}


/* === RELATED ARTICLES CONTAINER === */
/* =====================
   RELATED ARTICLES (CLEAN, AUTHORITATIVE)
   ===================== */

.nf-related-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 1.25rem 1.25rem;   /* REDUCED padding */
  background: #ffffff;
  border-radius: 4px;
}

.nf-related-heading {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Desktop: 2-column grid */
.nf-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.nf-related-card {
  display: block;
  color: #111;
  text-decoration: none;
  padding: 0;                /* IMPORTANT: no inner padding */
}

.nf-related-card img {
  width: 100%;
  height: auto;
  margin-bottom: 0.3rem;     /* TIGHT image → title */
}

.nf-related-card h4 {
  margin: 0;
  line-height: 1.25;
  font-size: 1rem;
}

/* Mobile: vertical list */
@media (max-width: 768px) {
  .nf-related-grid {
    grid-template-columns: 1fr;
  }
}
/* === FOOTER LINKS — DISTINCT & LINK-LIKE === */

.nf-footer-nav a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin: 0 0.8rem;

  font-size: 0.85rem;
  color: #111;           /* strong, readable */
}

.nf-footer-nav a:hover {
  color: #000;
  text-decoration-thickness: 2px;
}

/* === REMOVE IMAGE → TITLE GAP (GLOBAL CARD FIX) === */

/* Kill default heading top margin inside cards */
.nf-article-card h3,
.nf-related-card h4 {
  margin-top: 0 !important;
}

/* Tighten image container bottom spacing */
.nf-card-image,
.nf-related-card img {
  margin-bottom: 0.35rem !important;
}
/* =====================
   MOBILE
   ===================== */

@media (max-width: 768px) {

  body {
    padding-top: 80px;
  }

  .nf-header-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .nf-site-nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .nf-article-container {
    padding: 32px 18px;
  }
  
  .nf-article-title {
    font-size: 1.65rem;     /* was ~2.2rem */
    line-height: 1.25;
    margin-bottom: 0.6rem;
  }
  
  /* === MOBILE: FEATURED IMAGE FIX === */
  .nf-article-hero img {
    max-height: none;
    height: auto;
    width: 100%;
    object-fit: cover;
  }
  
    .nf-related-grid {
    grid-template-columns: 1fr; /* one per row */
  }
}