/*
Theme Name: The Truth Dude
Theme URI: https://thetruthdude.com
Author: The Truth Dude
Author URI: https://thetruthdude.com
Description: A lightweight, Elementor-optimized WordPress theme for The Truth Dude blog. Designed as a minimal base that lets Elementor handle page building while providing clean defaults, proper typography, and brand styling.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: truthdude
Tags: blog, news, custom-logo, custom-menu, featured-images, threaded-comments, elementor, full-width-template

The Truth Dude — Cutting Through the Noise.
*/

/* ═══════════════════════════════════════════
   CSS VARIABLES
   ═══════════════════════════════════════════ */
:root {
  --tdd-black: #0a0a0a;
  --tdd-dark: #1a1a1a;
  --tdd-red: #cc0000;          /* text, borders, accents — unchanged */
  --tdd-red-btn: #aa0000;      /* button & tag backgrounds — slightly darker */
  --tdd-red-hover: #cc0000;    /* hover = original red */
  --tdd-red-dark: #990000;
  --tdd-white: #f5f5f5;  /* slightly off-white — reduces light bleed on dark bg */
  --tdd-cream: #f8f7f4;
  --tdd-light-gray: #f0eeeb;
  --tdd-text: #2d2d2d;
  --tdd-text-light: #6b6b6b;
  --tdd-border: #e2dfda;
  --tdd-radius: 8px;
  --tdd-transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--tdd-text);
  background: var(--tdd-cream);
}

/* Dark section font smoothing — prevents light text bleeding on dark backgrounds */
.tdfc-homepage-section,
.tdfc-card,
.tdfc-card-link,
.tdd-nm-card-dark,
[style*="background:#0a0a0a"],
[style*="background:#0d0d0d"],
[style*="background:#141414"],
[style*="background:#1c1c1c"],
[style*="background:#1e1e1e"],
[style*="background:#2a2a2a"] {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tdd-transition);
}

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

/* ═══════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--tdd-black);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.site-header {
  background: var(--tdd-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--tdd-red);
  transition: box-shadow var(--tdd-transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo img {
  height: 50px;
  width: auto;
}

.site-logo a {
  display: flex;
  align-items: center;
}

/* Primary Nav */
.primary-nav ul {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}

.primary-nav a {
  display: block;
  padding: 0 1.1rem;
  height: 70px;
  line-height: 70px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tdd-text-light);
  transition: all var(--tdd-transition);
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: var(--tdd-black);
  border-bottom-color: var(--tdd-red);
}

/* Dropdown */
.primary-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--tdd-white);
  min-width: 220px;
  padding: 0.5rem 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  border-top: 2px solid var(--tdd-red);
  z-index: 100;
}

.primary-nav li {
  position: relative;
}

.primary-nav li:hover > .sub-menu {
  display: block;
}

.primary-nav .sub-menu a {
  height: auto;
  line-height: 1.4;
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  border-bottom: none;
  color: var(--tdd-text);
}

.primary-nav .sub-menu a:hover {
  background: rgba(204,0,0,0.08);
  color: var(--tdd-red);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--tdd-black);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
  background: var(--tdd-black);
  color: rgba(255,255,255,0.65);
  margin-top: 0;
}

.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
}

.footer-text a {
  color: var(--tdd-red);
}

/* ═══════════════════════════════════════════
   ELEMENTOR COMPATIBILITY
   ═══════════════════════════════════════════ */

/* Full-width Elementor pages */
.elementor-page .site-main {
  padding: 0;
  max-width: 100%;
}

/* Remove default content width restrictions for Elementor */
.elementor-page .entry-content {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* Ensure Elementor sections go full width */
body.elementor-page {
  overflow-x: hidden;
}

/* Default post/page content (non-Elementor pages) */
.default-content {
  max-width: 780px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Allow full-width blocks to break out of the default-content wrapper */
.default-content .alignfull,
.default-content .wp-block-group.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

/* Wide blocks — constrained to a generous max but still wider than default */
.default-content .alignwide,
.default-content .wp-block-group.alignwide {
  width: calc(100% + 120px);
  max-width: 1400px;
  margin-left: -60px;
  margin-right: -60px;
}

.default-content p {
  margin-bottom: 1.5rem;
}

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

.default-content blockquote {
  border-left: 4px solid var(--tdd-red);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--tdd-light-gray);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.default-content a {
  color: var(--tdd-red);
  text-decoration: underline;
  text-decoration-color: rgba(204,0,0,0.3);
  text-underline-offset: 3px;
}

.default-content a:hover {
  text-decoration-color: var(--tdd-red);
}

/* Comments */
.comments-area {
  max-width: 780px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.comments-area .comment-list {
  list-style: none;
}

.comments-area .comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--tdd-border);
}

.comment-reply-link,
.comments-area a {
  color: var(--tdd-red);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--tdd-border);
  border-radius: var(--tdd-radius);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  transition: border-color var(--tdd-transition);
  outline: none;
  background: var(--tdd-white);
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--tdd-red);
}

.comment-form .submit {
  background: var(--tdd-black);
  color: var(--tdd-white);
  border: none;
  padding: 0.8rem 2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--tdd-radius);
  cursor: pointer;
  transition: background var(--tdd-transition);
}

.comment-form .submit:hover {
  background: var(--tdd-red-btn);
}

/* ═══════════════════════════════════════════
   WORDPRESS CORE CLASSES
   ═══════════════════════════════════════════ */
.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1.5rem auto; }

.wp-caption-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--tdd-text-light);
  text-align: center;
  margin-top: 0.5rem;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .primary-nav {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .primary-nav.open {
    display: block;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--tdd-white);
    border-top: 2px solid var(--tdd-red);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  }

  .primary-nav.open ul {
    flex-direction: column;
  }

  .primary-nav.open a {
    height: auto;
    line-height: 1.4;
    padding: 0.8rem 2rem;
    border-bottom: 1px solid var(--tdd-border);
  }

  .header-inner {
    padding: 0 1rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ═══════════════════════════════════════════
   FOOTER (IMPROVED)
   ═══════════════════════════════════════════ */
.footer-top {
  background: var(--tdd-dark);
  padding: 3.5rem 2rem 2.5rem;
}
.footer-inner-wide {
  max-width: 1220px;
  margin: 0 auto;
}
.footer-top .footer-inner-wide {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.footer-brand .footer-logo img { height: 40px; width: auto; filter: brightness(0) invert(1); opacity: 0.9; }
.footer-partner-logos { display: flex; flex-direction: column; gap: 30px; margin-top: 1.25rem; }
.footer-partner-link { display: inline-block; }
.footer-partner-link img { height: 40px !important; width: auto !important; max-width: none !important; display: block; opacity: 0.85; transition: opacity 0.2s; }
.footer-partner-link:hover img { opacity: 1; }
.footer-about {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 340px;
}
.footer-socials { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  transition: all var(--tdd-transition);
  text-decoration: none;
}
.footer-social-link:hover { background: var(--tdd-red-btn); color: white; }

.footer-nav-title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.footer-nav-list { list-style: none; }
.footer-nav-list li { margin-bottom: 0.5rem; }
.footer-nav-list a {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--tdd-transition);
  text-decoration: none;
}
.footer-nav-list a:hover { color: var(--tdd-red); }

.footer-bottom {
  background: var(--tdd-black);
  padding: 1rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copyright {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  transition: color var(--tdd-transition);
  text-decoration: none;
}
.footer-legal a:hover { color: var(--tdd-red); }

/* ═══════════════════════════════════════════
   SINGLE POST (IMPROVED)
   ═══════════════════════════════════════════ */
.single-post .default-content {
  max-width: 740px;
  margin: 2.5rem auto;
}
.post-header {
  max-width: 740px;
  margin: 2.5rem auto 0;
  padding: 0 2rem;
}
.post-category-tag {
  display: inline-block;
  background: var(--tdd-red-btn);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 1rem;
}
.post-header h1 {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 2.8rem;
  line-height: 1.1;
  color: var(--tdd-black);
  margin: 0 0 1rem;
}
.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--tdd-text-light);
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--tdd-border);
  flex-wrap: wrap;
}
.post-meta-dot { color: var(--tdd-border); }
.post-reading-time { color: var(--tdd-text-light); }
.post-featured-image {
  max-width: 940px;
  margin: 2rem auto;
  padding: 0 2rem;
}
.post-featured-image img {
  width: 100%;
  border-radius: var(--tdd-radius);
  display: block;
}

/* ═══════════════════════════════════════════
   RESPONSIVE (FOOTER)
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .footer-top .footer-inner-wide {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom-inner {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .footer-legal { justify-content: center; }
  .post-header h1 { font-size: 2rem; }
}
