/*
Theme Name: TechStackToday
Theme URI: https://techstacktoday.com
Author: TechStackToday
Author URI: https://techstacktoday.com
Description: A clean, conversion-focused tech service comparison theme for TechStackToday.com. Includes a homepage template and a service comparison affiliate landing page template.
Version: 2.6.4
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: techstacktoday
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ═══════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════ */
:root {
  --navy: #0b1d3a;
  --navy-mid: #132a50;
  --blue: #1a56db;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --sky: #e8f0fe;
  --sky-mid: #c7d9fd;
  --cyan: #22d3ee;
  --accent: #06c97a;
  --accent-dark: #059a5c;
  --accent-bg: #f0fdf6;
  --accent-bd: #d1fae5;
  --red: #ef4444;
  --red-bg: #fef2f2;
  --red-bd: #fecaca;
  --amber: #f59e0b;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --text: #0f172a;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(11,29,58,0.10);
  --shadow-lg: 0 8px 48px rgba(11,29,58,0.15);
}

/* ═══════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; max-width: 100%; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}
h1, h2, h3, h4, h5, h6 { font-family: 'Sora', sans-serif; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: 'DM Sans', sans-serif; }

/* ═══════════════════════════════════════════════════
   LAYOUT UTILITIES
═══════════════════════════════════════════════════ */
.tst-container   { max-width: 1160px; margin: 0 auto; padding: 0 24px; width: 100%; }
.tst-container-wide { max-width: 1240px; margin: 0 auto; padding: 0 16px; width: 100%; }
@media (max-width: 600px) {
  .tst-container, .tst-container-wide { padding: 0 16px; }
}

/* ═══════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════ */
/* ── Navigation bar ── */
.tst-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 2px 12px rgba(11,29,58,0.06);
  width: 100%;
}
.tst-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; position: relative;
}
.tst-logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800; font-size: 1.15rem;
  color: var(--navy);
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0; z-index: 201;
}
.tst-logo em { color: var(--cyan); font-style: normal; }
.tst-logo svg { flex-shrink: 0; }

/* ── Nav links wrapper ── */
.tst-nav-links {
  display: flex; align-items: center; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}

/* ── Each nav item wrapper ── */
.tst-nav-item {
  position: relative; display: flex; align-items: center;
}

/* ── Nav link ── */
.tst-nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.9rem; font-weight: 500; color: var(--gray-600);
  padding: 8px 12px; border-radius: 6px;
  text-decoration: none; white-space: nowrap;
  transition: color 0.18s, background 0.18s;
  cursor: pointer;
}
.tst-nav-link:hover,
.tst-has-dropdown:hover > .tst-nav-link { color: var(--navy); background: var(--gray-50); }

/* CTA button in nav */
.tst-nav-cta {
  background: var(--blue) !important; color: white !important;
  padding: 9px 18px !important; border-radius: 8px !important;
  font-family: 'Sora', sans-serif; font-weight: 700 !important;
  margin-left: 8px;
}
.tst-nav-cta:hover { background: var(--navy) !important; }

/* Chevron */
.tst-chevron { flex-shrink: 0; transition: transform 0.2s; pointer-events: none; }
.tst-has-dropdown:hover > .tst-nav-link .tst-chevron { transform: rotate(180deg); }

/* ── Dropdown panel ── */
.tst-dropdown {
  visibility: hidden; opacity: 0; pointer-events: none;
  position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(11,29,58,0.13);
  padding: 6px;
  min-width: 210px;
  z-index: 300;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
/* Caret arrow */
.tst-dropdown::before {
  content: ''; position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--gray-200);
}
/* Show on hover */
.tst-has-dropdown:hover > .tst-dropdown {
  visibility: visible; opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* Dropdown item */
.tst-dropdown-item {
  display: block; padding: 9px 14px;
  font-size: 0.875rem; font-weight: 500; color: var(--gray-700);
  border-radius: 8px; text-decoration: none;
  transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.tst-dropdown-item:hover { background: var(--blue-pale); color: var(--blue); }

/* ── Hamburger (mobile only) ── */
.tst-nav-hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px;
  background: none; border: none; cursor: pointer; border-radius: 8px; z-index: 201;
}
.tst-nav-hamburger span {
  display: block; width: 100%; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.tst-nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tst-nav-hamburger.open span:nth-child(2) { opacity: 0; }
.tst-nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav ── */
@media (max-width: 860px) {
  .tst-nav-hamburger { display: flex; }

  /* Full-width mobile menu panel */
  .tst-nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-top: 1px solid var(--gray-100);
    box-shadow: 0 8px 24px rgba(11,29,58,0.1);
    padding: 8px 12px 16px; z-index: 199;
  }
  .tst-nav-links.open { display: flex; }

  .tst-nav-item { width: 100%; flex-direction: column; align-items: stretch; }
  .tst-nav-link { width: 100%; padding: 11px 14px; border-radius: 8px; }
  .tst-nav-cta { margin: 8px 0 0 !important; justify-content: center; }

  /* Dropdown always visible on mobile as a sub-list */
  .tst-dropdown {
    visibility: visible; opacity: 1; pointer-events: auto;
    position: static; transform: none;
    box-shadow: none; border: none; border-radius: 0;
    padding: 0 0 4px 28px; min-width: 0; background: transparent;
    transition: none;
  }
  .tst-dropdown::before { display: none; }
  .tst-dropdown-item {
    padding: 7px 12px; font-size: .85rem;
    color: var(--gray-500); border-radius: 6px;
  }
  .tst-dropdown-item:hover { color: var(--blue); background: var(--blue-pale); }
  .tst-chevron { display: none; }
}

/* ═══════════════════════════════════════════════════
   LOGO SVG (inline, reusable)
═══════════════════════════════════════════════════ */
.tst-logo-svg-32 { width: 32px; height: 32px; flex-shrink: 0; }
.tst-logo-svg-28 { width: 28px; height: 28px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════
   SECTION SHARED
═══════════════════════════════════════════════════ */
.tst-section { padding: 80px 0; }
.tst-section-label {
  display: inline-block;
  background: var(--sky); color: var(--blue);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 100px; margin-bottom: 10px;
}
.tst-section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--navy); margin-bottom: 14px;
}
.tst-section-sub {
  font-size: 1rem; color: var(--gray-600);
  max-width: 560px; line-height: 1.7; margin-bottom: 48px;
}

/* ═══════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════ */
.tst-btn-primary {
  background: var(--accent); color: white;
  padding: 13px 26px; border-radius: 10px;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 0.92rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s; box-shadow: 0 4px 18px rgba(6,201,122,0.32);
  text-decoration: none; cursor: pointer; border: none;
}
.tst-btn-primary:hover {
  background: var(--accent-dark); transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(6,201,122,0.42);
}
.tst-btn-outline {
  background: transparent; color: white;
  padding: 13px 26px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.35);
  font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.92rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s; text-decoration: none;
}
.tst-btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.6);
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.tst-footer {
  background: var(--navy);
  padding: 52px 0 28px;
  width: 100%; overflow-x: hidden;
}
.tst-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 44px; margin-bottom: 44px;
}
.tst-footer-brand p {
  color: rgba(255,255,255,0.48); font-size: 0.83rem; line-height: 1.7;
  max-width: 240px; margin-top: 12px;
}
.tst-footer-col h5 {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); margin-bottom: 14px;
}
.tst-footer-col a {
  display: block; color: rgba(255,255,255,0.58);
  font-size: 0.83rem; margin-bottom: 9px; transition: color 0.2s;
}
.tst-footer-col a:hover { color: white; }
.tst-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.tst-footer-bottom p { color: rgba(255,255,255,0.32); font-size: 0.76rem; }
.tst-footer-disclaimer {
  color: rgba(255,255,255,0.26); font-size: 0.7rem;
  max-width: 700px; line-height: 1.6; text-align: center; margin: 14px auto 0;
}
@media (max-width: 900px) {
  .tst-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .tst-footer-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   WORDPRESS CORE ALIGNMENTS (required)
═══════════════════════════════════════════════════ */
.alignleft  { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { clear: both; display: block; margin: 0 auto 1em; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.82rem; color: var(--gray-500); margin-top: 4px; }
.screen-reader-text {
  clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal !important;
}
