/*
Theme Name: TST News Theme
Theme URI: https://tstnews.com
Author: TST News Media
Author URI: https://tstnews.com
Description: Ultra-fast, mobile-first, production-ready WordPress theme for TST News. Features category news sorting, instant AJAX load, Google Discover optimization, Rank Math compatibility, and mobile edge-to-edge full width layouts.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: news, entertainment, grid-layout, custom-colors, custom-menu, featured-images, flexible-header, responsive-layout, theme-options, translation-ready
Text Domain: tst-news
*/

/* Reset & CSS Custom Properties */
:root {
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --color-primary: #d90429;
  --color-primary-hover: #ef233c;
  --color-secondary: #111827;
  --color-bg: #f8fafc;
  --color-card-bg: #ffffff;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  
  --color-header-bg: #0f172a;
  --color-header-text: #ffffff;
  --color-nav-link: #cbd5e1;
  --color-nav-hover: #ffffff;
  
  --color-footer-bg: #0b0f19;
  --color-footer-text: #94a3b8;
  
  --site-max-width: 1280px;
  --content-width: 840px;
  --article-width: 800px;
  --sidebar-width: 360px;
  --site-gap: 2rem;
  
  --header-height: 68px;
  --border-radius: 8px;
  --card-radius: 12px;
  --transition-fast: 0.15s ease;
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.85rem, 4vw + 1rem, 2.75rem); }
h2 { font-size: clamp(1.4rem, 2.5vw + 0.8rem, 2rem); }
h3 { font-size: clamp(1.15rem, 1.8vw + 0.6rem, 1.45rem); }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1.25rem;
}

/* Layout Utilities */
.site-container {
  width: 100%;
  max-width: var(--site-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--site-gap);
  padding-top: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 1024px) {
  .main-layout.has-sidebar {
    grid-template-columns: 1fr var(--sidebar-width);
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 9999;
  border-radius: 4px;
  font-weight: 700;
}
.skip-link:focus {
  top: 1rem;
}
