/*
Theme Name: GoldTrend Today
Theme URI: https://goldtrendtoday.com
Author: GoldTrend Today
Author URI: https://goldtrendtoday.com
Description: Original editorial news & magazine theme for GoldTrend Today — gold, silver, and global market news. Classic broadsheet look, built from scratch.
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: goldtrend-today
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --meta-gray: #767676;
  --rule: #1a1a1a;
  --rule-light: #e2e0da;
  --paper: #fdfdfb;
  --paper-alt: #f7f6f2;
  --gold: #a6791f;
  --gold-deep: #8a6417;
  --bar-dark: #14161a;
  --danger: #b3261e;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1280px;
  --gutter: 24px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 0.5em; color: var(--ink); line-height: 1.15; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.section-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.section-heading h2 { font-size: 26px; margin: 0; }
.section-heading .section-link {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep);
  white-space: nowrap;
}
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 12px 20px; z-index: 10000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================================
   TOP UTILITY BAR (date)
   ============================================ */
.gt-topbar {
  background: var(--bar-dark);
  color: #cfcfcf;
  font-size: 13px;
}
.gt-topbar .container { display: flex; align-items: center; height: 38px; gap: 20px; }
.gt-topbar .gt-date { color: #9a9a9a; white-space: nowrap; }

/* ============================================
   BREAKING NEWS TICKER
   ============================================ */
.gt-ticker {
  background: var(--bar-dark);
  border-top: 1px solid #262a31;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.gt-ticker .container { display: flex; align-items: stretch; padding: 0; }
.gt-ticker-label {
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex: none;
  z-index: 2;
}
.gt-ticker-track-wrap {
  overflow: hidden;
  flex: 1;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.gt-ticker-track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: gt-scroll 38s linear infinite;
  padding: 0 10px;
}
.gt-ticker-track:hover { animation-play-state: paused; }
.gt-ticker-track span {
  padding: 10px 32px;
  font-size: 13px;
  color: #e7e7e7;
  border-right: 1px solid #33383f;
}
@keyframes gt-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================
   HEADER
   ============================================ */
.gt-header { background: var(--paper); border-bottom: 1px solid var(--rule-light); }
.gt-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}
.gt-logo { display: flex; flex-direction: column; line-height: 1; }
.gt-logo-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 6px;
  display: inline-block;
}
.gt-logo-mark .gt-accent { color: var(--gold); }
.gt-logo-sub {
  font-family: var(--font-display);
  font-style: normal;
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.5em;
  color: var(--meta-gray);
  margin-top: 6px;
  text-transform: uppercase;
}
.gt-header-actions { display: flex; align-items: center; gap: 18px; }
.gt-icon-btn {
  background: none; border: none; color: var(--ink); padding: 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.gt-hamburger { display: none; }

/* Primary nav */
.gt-nav-wrap { background: var(--paper); border-bottom: 1px solid var(--rule); }
.gt-nav { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; }
.gt-nav li { position: relative; }
.gt-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.gt-nav a svg { width: 15px; height: 15px; flex: none; color: var(--gold-deep); }
.gt-nav a:hover, .gt-nav li.current-menu-item a {
  border-bottom-color: var(--gold);
  color: var(--gold-deep);
}
.gt-nav .gt-nav-highlight a { color: var(--danger); }
.gt-nav .gt-nav-highlight a svg { color: var(--danger); }

@media (max-width: 900px) {
  .gt-hamburger {
    display: inline-flex; background: none; border: none; padding: 6px;
  }
  .gt-nav-wrap {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  }
  .gt-nav-wrap.is-open { max-height: 600px; }
  .gt-nav { flex-direction: column; }
  .gt-nav a { padding: 14px 20px; border-bottom: 1px solid var(--rule-light); border-left: 3px solid transparent; }
  .gt-nav a:hover, .gt-nav li.current-menu-item a { border-bottom-color: var(--rule-light); border-left-color: var(--gold); }
}

/* ============================================
   HERO SLIDER
   ============================================ */
.gt-hero { margin: 32px 0; }
.gt-slider { position: relative; overflow: hidden; border: 1px solid var(--rule-light); }
.gt-slide {
  display: none;
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 260px;
  background: #111 no-repeat center/cover;
}
.gt-slide.is-active { display: block; }
.gt-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 75%);
}
.gt-slide-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 28px clamp(16px, 4vw, 48px) 32px;
  color: #fff;
  max-width: 820px;
}
.gt-slide-cat {
  display: inline-block;
  background: var(--gold);
  color: #1a1408;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  margin-bottom: 14px;
}
.gt-slide-title { font-size: clamp(22px, 3.4vw, 38px); color: #fff; margin: 0 0 10px; }
.gt-slide-excerpt { font-size: 15px; color: #d8d8d8; max-width: 640px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gt-slider-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.4); color: #fff;
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.gt-slider-nav.prev { left: 16px; }
.gt-slider-nav.next { right: 16px; }
.gt-slider-dots { position: absolute; bottom: 14px; right: 20px; z-index: 3; display: flex; gap: 8px; }
.gt-slider-dots button { width: 8px; height: 8px; border-radius: 50%; border: 1px solid #fff; background: transparent; padding: 0; }
.gt-slider-dots button.is-active { background: var(--gold); border-color: var(--gold); }

/* ============================================
   LAYOUT: main + sidebar
   ============================================ */
.gt-layout { display: grid; grid-template-columns: 2.4fr 1fr; gap: 48px; align-items: start; margin-bottom: 56px; }
@media (max-width: 960px) { .gt-layout { grid-template-columns: 1fr; } }

/* ============================================
   POST CARDS
   ============================================ */
.gt-post-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.gt-post-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gt-post-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .gt-post-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 600px) { .gt-post-grid { grid-template-columns: 1fr !important; } }

.gt-card { display: flex; flex-direction: column; }
.gt-card-thumb {
  position: relative; overflow: hidden; background: var(--paper-alt);
  aspect-ratio: 4/3; margin-bottom: 14px; border: 1px solid var(--rule-light);
}
.gt-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gt-card:hover .gt-card-thumb img { transform: scale(1.06); }
.gt-card-thumb .gt-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--gold); color: #1a1408;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px;
}
.gt-card h3 { font-size: 18px; margin-bottom: 8px; }
.gt-card h3 a:hover { color: var(--gold-deep); }
.gt-card p { font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
.gt-card-meta { font-size: 12px; color: var(--meta-gray); letter-spacing: 0.02em; }

/* Numbered ranked list (sidebar "latest news") */
.gt-ranked-list li {
  display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--rule-light);
}
.gt-ranked-list li:first-child { padding-top: 0; }
.gt-ranked-num {
  font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--gold);
  flex: none; width: 28px;
}
.gt-ranked-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.gt-ranked-title a:hover { color: var(--gold-deep); }
.gt-ranked-date { font-size: 12px; color: var(--meta-gray); }

.widget-title, .gt-sidebar h2 {
  font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--font-body); font-weight: 800;
  border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 16px;
}

/* Category section on homepage */
.gt-cat-section { margin-bottom: 56px; }

/* ============================================
   SINGLE ARTICLE PAGE
   ============================================ */
.gt-article-head { max-width: 820px; margin: 40px auto 0; text-align: left; }
.gt-article-cat { display: inline-block; background: var(--gold); color: #1a1408; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; margin-bottom: 16px; }
.gt-article-title { font-size: clamp(28px, 4vw, 44px); margin-bottom: 16px; }
.gt-article-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--meta-gray); border-top: 1px solid var(--rule-light); border-bottom: 1px solid var(--rule-light); padding: 14px 0; margin-bottom: 8px; }
.gt-article-meta strong { color: var(--ink); }
.gt-article-thumb { margin: 28px 0; border: 1px solid var(--rule-light); }
.gt-article-body { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.75; color: #262626; }
.gt-article-body p { margin: 0 0 22px; }
.gt-article-body h2 { font-size: 26px; margin: 40px 0 16px; }
.gt-article-body h3 { font-size: 20px; margin: 30px 0 12px; }
.gt-article-body ul, .gt-article-body ol { margin: 0 0 22px; padding-left: 24px; }
.gt-article-body li { margin-bottom: 8px; }
.gt-article-body strong { color: var(--ink); }
.gt-article-body a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.gt-article-foot { max-width: 760px; margin: 40px auto 0; padding-top: 24px; border-top: 1px solid var(--rule-light); }
.gt-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.gt-tags a { font-size: 12px; background: var(--paper-alt); border: 1px solid var(--rule-light); padding: 6px 12px; }
.gt-share { display: flex; gap: 10px; align-items: center; }
.gt-share span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--meta-gray); font-weight: 700; }
.gt-share a { width: 34px; height: 34px; border: 1px solid var(--rule-light); display: flex; align-items: center; justify-content: center; }
.gt-share a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.gt-author-box { display: flex; gap: 16px; align-items: flex-start; background: var(--paper-alt); border: 1px solid var(--rule-light); padding: 20px; margin: 32px auto; max-width: 760px; }
.gt-author-box img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.gt-author-box h3 { font-size: 15px; margin-bottom: 4px; }
.gt-author-box p { font-size: 13px; color: var(--ink-soft); margin: 0; }

.gt-related { max-width: 1000px; margin: 56px auto 0; }

/* ============================================
   STATIC PAGE (About / Privacy / Contact)
   ============================================ */
.gt-page-head { text-align: center; padding: 52px 0 32px; border-bottom: 1px solid var(--rule-light); margin-bottom: 44px; }
.gt-page-head .eyebrow { display: block; margin-bottom: 10px; }
.gt-page-head h1 { font-size: clamp(30px, 4.4vw, 48px); }
.gt-page-body { max-width: 760px; margin: 0 auto 64px; font-size: 17px; line-height: 1.8; color: #262626; }
.gt-page-body h2 { font-size: 23px; margin: 36px 0 14px; }
.gt-page-body p { margin: 0 0 18px; }
.gt-page-body ul { margin: 0 0 18px; padding-left: 22px; list-style: disc; }
.gt-page-body li { margin-bottom: 8px; }
.gt-page-body a { text-decoration: underline; text-decoration-color: var(--gold); }

/* ============================================
   ARCHIVE / CATEGORY
   ============================================ */
.gt-archive-head { padding: 40px 0 24px; border-bottom: 2px solid var(--ink); margin-bottom: 36px; }
.gt-archive-head .eyebrow { display: block; margin-bottom: 8px; }
.gt-archive-head h1 { font-size: clamp(26px, 3.6vw, 38px); }
.gt-archive-head p { color: var(--ink-soft); margin-top: 10px; max-width: 640px; }
.gt-pagination { display: flex; justify-content: center; gap: 8px; margin: 48px 0 24px; }
.gt-pagination a, .gt-pagination span { border: 1px solid var(--rule-light); padding: 8px 16px; font-size: 14px; font-weight: 600; }
.gt-pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ============================================
   EMPTY / SEARCH
   ============================================ */
.gt-empty { text-align: center; padding: 64px 20px; max-width: 560px; margin: 0 auto; }
.gt-empty h1 { font-size: 26px; margin-bottom: 12px; }
.gt-search-form { display: flex; max-width: 480px; margin: 24px auto 0; border: 2px solid var(--ink); }
.gt-search-form input { flex: 1; border: none; padding: 12px 14px; font-size: 15px; background: transparent; }
.gt-search-form button { border: none; background: var(--ink); color: #fff; padding: 0 20px; }
.gt-search-overlay {
  position: fixed; inset: 0; background: rgba(20,22,26,.94); z-index: 9999;
  display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh;
  visibility: hidden; opacity: 0; transition: opacity .2s ease;
}
.gt-search-overlay.is-open { visibility: visible; opacity: 1; }
.gt-search-overlay .gt-search-form { border-color: var(--gold); width: min(560px, 88vw); }
.gt-search-overlay .gt-search-form input { color: #fff; font-size: 20px; padding: 16px; }
.gt-search-close { position: absolute; top: 24px; right: 32px; background: none; border: none; color: #fff; }

/* ============================================
   COMMENTS
   ============================================ */
.gt-comments { max-width: 760px; margin: 0 auto 64px; }
.gt-comments h2 { font-size: 22px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.comment-list { margin-top: 24px; }
.comment-body { border-bottom: 1px solid var(--rule-light); padding: 18px 0; }
.comment-author { font-weight: 700; font-size: 14px; }
.comment-meta { font-size: 12px; color: var(--meta-gray); margin-bottom: 8px; }
.comment-form input, .comment-form textarea {
  width: 100%; border: 1px solid var(--rule-light); padding: 10px 12px; font-family: var(--font-body);
  font-size: 14px; margin-bottom: 14px;
}
.comment-form .form-submit input {
  width: auto; background: var(--ink); color: #fff; border: none; padding: 12px 24px; font-weight: 700;
}

/* ============================================
   FOOTER
   ============================================ */
.gt-footer { background: var(--bar-dark); color: #b9bcc2; margin-top: 64px; position: relative; }
.gt-footer-divider { display: block; width: 100%; line-height: 0; margin-bottom: -1px; }
.gt-footer-divider svg { width: 100%; height: 64px; display: block; }
.gt-footer-top { padding: 20px 0 44px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .gt-footer-top { grid-template-columns: 1fr 1fr; gap: 32px 24px; } .gt-footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .gt-footer-top { grid-template-columns: 1fr; } }
.gt-footer-brand .gt-logo-mark { color: #fff; border-bottom-color: var(--gold); }
.gt-footer-brand .gt-logo-sub { color: #7d818a; }
.gt-footer-brand p { margin-top: 16px; font-size: 14px; line-height: 1.7; color: #9a9da4; max-width: 320px; }
.gt-footer h4 {
  color: #fff; font-family: var(--font-body); font-size: 12.5px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 20px;
  position: relative; padding-bottom: 12px;
}
.gt-footer h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--gold); }
.gt-footer ul li { margin-bottom: 12px; }
.gt-footer a { font-size: 14px; color: #b9bcc2; transition: color .15s ease; }
.gt-footer a:hover { color: var(--gold); }
.gt-footer-follow p { font-size: 13px; color: #9a9da4; margin: 0 0 16px; }
.gt-footer-bottom {
  border-top: 1px solid #262a31; padding: 22px 0; font-size: 13px; color: #7d818a;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.gt-footer-legal { display: flex; gap: 10px; flex-wrap: wrap; }
.gt-footer-legal span { color: #454a52; }
.gt-footer-legal a { color: #9a9da4; font-size: 13px; }
.gt-footer-legal a:hover { color: var(--gold); }
.gt-social { display: flex; gap: 10px; }
.gt-social a {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid #33383f;
  display: flex; align-items: center; justify-content: center; color: #cfcfcf;
  transition: all .15s ease;
}
.gt-social a:hover { background: var(--gold); border-color: var(--gold); color: #1a1408; }
