/*
Theme Name: Lifethinkler Theme
Theme URI: https://lifethinkler.com
Author: Lifethinkler
Description: Refined Dark Editorial theme for Lifethinkler — life, philosophy & personal growth.
Version: 1.0
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */

:root {
  --color-ink:    #1a1a2e;
  --color-navy:   #16213e;
  --color-deep:   #0f3460;
  --color-gold:   #c9a84c;
  --color-sage:   #4a7c59;
  --color-cream:  #f7f3ee;
  --color-sand:   #e8e0d0;
  --color-white:  #ffffff;
  --color-muted:  #9ca3af;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-utility: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font: 400 17px/1.8 var(--font-body);
  background: var(--color-ink);
  color: var(--color-muted);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul,
ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(32px, 5vw, 42px); }
h2 { font-size: clamp(26px, 4vw, 32px); line-height: 1.3; }
h3 { font-size: clamp(20px, 3vw, 24px); font-weight: 400; line-height: 1.4; }

.hero-heading {
  font: 700 clamp(40px, 7vw, 64px)/1.1 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--color-white);
}

.caption {
  font: 400 13px/1.6 var(--font-body);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section { padding: 48px 0; }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-header {
  height: 64px;
  background: var(--color-ink);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header__inner {
  display: flex;
  align-items: center;
  height: 64px;
  flex-wrap: nowrap;
}

.site-header.scrolled {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo__img {
  display: block;
  height: 38px;
  width: auto;
  object-fit: contain;
}

#primary-nav {
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 28px;
}

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

.nav-link {
  font: 500 13px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-white);
}

.nav-link__chevron {
  font-size: 10px;
  margin-left: 5px;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.nav-item:hover .nav-link__chevron {
  transform: rotate(180deg);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Dropdown */
.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  /* padding-top bridges the visual gap without creating a dead hover zone */
  padding: 4px 0 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-inner {
  background: var(--color-navy);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-inner a {
  display: block;
  padding: 9px 18px;
  font: 400 13px/1 var(--font-body);
  color: var(--color-muted);
  transition: color 0.15s, background 0.15s;
}

.nav-dropdown-inner a:hover {
  color: var(--color-white);
  background: rgba(201, 168, 76, 0.08);
}

/* Subscribe CTA button */
.nav-subscribe {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border: 1px solid var(--color-gold);
  border-radius: 50px;
  font: 500 13px/1 var(--font-body);
  color: var(--color-gold);
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-subscribe:hover {
  background: var(--color-gold);
  color: var(--color-ink);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-navy);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 16px 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-link {
    padding: 14px 24px;
    width: 100%;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: var(--color-ink);
    border: none;
    border-radius: 0;
    padding: 0;
    display: none;
  }

  .nav-item.open .nav-dropdown {
    display: block;
  }
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-gold);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-gold);
  color: var(--color-ink);
  font: 600 15px var(--font-body);
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font: 500 15px var(--font-body);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* ============================================================
   ARTICLE CARDS
   ============================================================ */

.article-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-navy);
  border: 1px solid rgba(201, 168, 76, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.light-section .article-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-thumbnail-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--color-deep) 0%, var(--color-navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.card-category {
  display: inline-block;
  background: var(--color-sage);
  color: #e6f4ec;
  font: 500 11px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.card-body {
  padding: 20px;
}

.card-title {
  font: 700 20px/1.3 var(--font-display);
  color: var(--color-white);
  margin: 0 0 10px;
}

.light-section .card-title {
  color: var(--color-ink);
}

.card-excerpt {
  font: 400 14px/1.7 var(--font-body);
  color: var(--color-muted);
  margin: 0 0 16px;
}

.light-section .card-excerpt {
  color: #6b7280;
}

.card-meta {
  font: 400 12px/1 var(--font-body);
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-meta-divider {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-muted);
  opacity: 0.5;
}

/* ============================================================
   SECTION LABELS
   ============================================================ */

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--font-body);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1.5px;
  background: var(--color-gold);
  border-radius: 2px;
  flex-shrink: 0;
}


/* ============================================================
   SHARED PAGE COMPONENTS (About, Contact, Legal pages)
   ============================================================ */

/* Breadcrumb */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 13px/1 var(--font-body);
  color: var(--color-muted);
  margin-bottom: 24px;
}

.page-breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.page-breadcrumb a:hover { color: var(--color-gold); }

.page-breadcrumb__sep {
  font-size: 10px;
  opacity: 0.4;
}

.page-breadcrumb span {
  color: var(--color-white);
  opacity: 0.55;
}

/* Cross-page link button */
.contact-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font: 500 14px/1 var(--font-body);
  color: var(--color-muted);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.contact-link-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}


/* ============================================================
   SIDEBAR (shared across single.php + archive.php)
   ============================================================ */

.sidebar-sticky {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: var(--color-navy);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 22px;
}

/* Override global h3 for sidebar headings */
.sidebar-widget__title,
h3.sidebar-widget__title {
  font: 600 11px/1 var(--font-body) !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold) !important;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-post {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: opacity 0.2s;
}

.sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post:hover { opacity: 0.75; }

.sidebar-post__thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-post__thumb--empty {
  background: var(--color-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(201, 168, 76, 0.25);
  font-size: 16px;
}

.sidebar-post__title {
  font: 500 13px/1.4 var(--font-body);
  color: var(--color-white);
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post__date {
  font: 400 11px/1 var(--font-body);
  color: var(--color-muted);
}

.sidebar-cats {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-cats a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font: 400 13px/1 var(--font-body);
  color: var(--color-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-cats li:last-child a { border-bottom: none; }
.sidebar-cats a:hover { color: var(--color-gold); }
.sidebar-cats span {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 50px;
  flex-shrink: 0;
}

/* Share buttons in sidebar */
.share-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 8px;
  font: 500 13px var(--font-body);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  width: 100%;
  text-align: left;
}

.share-btn--facebook:hover { color: #fff; background: rgba(24, 119, 242, 0.15); border-color: rgba(24,119,242,0.3); }
.share-btn--facebook .fa-facebook-f { color: #1877f2; }
.share-btn--x:hover { color: #fff; background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); }
.share-btn--copy:hover { color: var(--color-gold); border-color: rgba(201,168,76,0.3); background: rgba(201,168,76,0.06); }

/* Mini newsletter widget in sidebar */
.sidebar-newsletter {
  text-align: center;
  background: linear-gradient(135deg, rgba(15, 52, 96, 0.5) 0%, rgba(22, 33, 62, 0.9) 100%);
  border-color: rgba(201, 168, 76, 0.15);
}

.sidebar-newsletter__icon {
  font-size: 28px;
  color: var(--color-gold);
  margin-bottom: 12px;
  display: block;
}

.sidebar-newsletter__heading,
h3.sidebar-newsletter__heading {
  font: 700 17px/1.2 var(--font-display) !important;
  color: var(--color-white) !important;
  margin: 0 0 10px;
}

.sidebar-newsletter__text {
  font: 400 13px/1.6 var(--font-body);
  color: var(--color-muted);
  margin: 0 0 16px;
}


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

.site-footer {
  background: var(--color-ink);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: start;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

.footer-tagline {
  font: 400 14px/1.7 var(--font-body);
  color: var(--color-muted);
  margin-top: 12px;
  max-width: 260px;
}

.footer-meta {
  font: 400 12px/1 var(--font-body);
  color: var(--color-muted);
  opacity: 0.5;
  margin-top: 10px;
  letter-spacing: 0.04em;
}

.footer-socials { margin-top: 20px; }

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--color-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.footer-social-btn:hover {
  color: #fff;
  border-color: #1877f2;
  background: rgba(24, 119, 242, 0.15);
}

.footer-social-btn .fa-facebook-f { color: #1877f2; }

.footer-heading {
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  font: 400 13px/1 var(--font-body);
  color: var(--color-muted);
  opacity: 0.75;
  transition: color 0.2s, opacity 0.2s;
}

.footer-links a:hover {
  color: var(--color-gold);
  opacity: 1;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font: 400 12px/1 var(--font-body);
  color: var(--color-muted);
  opacity: 0.55;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-bottom__right { opacity: 0.5; }

.footer-bottom__right a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom__right a:hover { color: var(--color-gold); }

/* ============================================================
   AD SLOTS
   Ad containers are pre-designed and ready. Actual AdSense tags
   are injected via Google Site Kit — no manual code needed here.
   ============================================================ */

/* Shared container — wraps whatever Site Kit or manual code outputs */
.ad-slot {
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* In-article slot — sits between paragraphs */
.ad-in-content {
  margin: 40px auto;
  max-width: 740px;
  min-height: 90px;
}

/* Leaderboard banner — top of archive / category pages */
.ad-banner {
  margin: 0 auto 48px;
  max-width: 100%;
  min-height: 90px;
  text-align: center;
}

/* Sidebar rectangle */
.ad-sidebar {
  margin-bottom: 32px;
  min-height: 250px;
}

/* Below-hero slot — after hero section, before article grid */
.ad-below-hero {
  margin: 0 auto 48px;
  max-width: 970px;
  min-height: 90px;
  text-align: center;
}

/* "Advertisement" label above each slot — good UX + policy compliance */
.ad-slot::before,
.ad-in-content::before,
.ad-banner::before,
.ad-sidebar::before,
.ad-below-hero::before {
  content: 'Advertisement';
  display: block;
  font: 400 10px/1 var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  opacity: 0.5;
  text-align: center;
  margin-bottom: 6px;
  width: 100%;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.text-gold   { color: var(--color-gold); }
.text-sage   { color: var(--color-sage); }
.text-white  { color: var(--color-white); }
.text-muted  { color: var(--color-muted); }

.bg-ink    { background: var(--color-ink); }
.bg-navy   { background: var(--color-navy); }
.bg-cream  { background: var(--color-cream); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================
   WORDPRESS CORE COMPATIBILITY
   ============================================================ */

.wp-caption,
.wp-caption img {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin-top: 8px;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft  { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }

/* Screen reader skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-gold);
  color: var(--color-ink);
  padding: 8px 16px;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}
