/*
Theme Name: The Trenet
Theme URI: https://thetrenet.com
Author: The Trenet
Description: Clean, fast, editorial news & magazine WordPress theme for The Trenet, built without page-builder bloat.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-trenet
Tags: news, magazine, blog, editorial, responsive-layout, custom-logo, custom-menu
*/

:root {
  --trenet-primary: #ed3237;
  --trenet-primary-dark: #c92227;
  --trenet-dark: #111111;
  --trenet-dark-2: #1c1c1c;
  --trenet-text: #1a1a1a;
  --trenet-muted: #666666;
  --trenet-border: #e6e6e6;
  --trenet-surface: #f7f7f7;
  --trenet-white: #ffffff;
  --trenet-radius: 6px;
  --trenet-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --trenet-font-serif: 'Merriweather', Georgia, serif;
  --trenet-container: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--trenet-font-sans);
  color: var(--trenet-text);
  background-color: var(--trenet-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--trenet-primary);
}

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

.container {
  width: 100%;
  max-width: var(--trenet-container);
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Utility Bar */
.trenet-topbar {
  background: var(--trenet-dark);
  color: #cccccc;
  font-size: 12px;
  padding: 7px 0;
}

.trenet-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trenet-topbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trenet-topbar-links a:hover {
  color: var(--trenet-white);
}

/* Main Header */
.trenet-header {
  background: var(--trenet-white);
  border-bottom: 1px solid var(--trenet-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.trenet-header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
}

.trenet-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.trenet-brand-text {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--trenet-dark);
  line-height: 1;
}

.trenet-brand-text span {
  color: var(--trenet-primary);
}

.trenet-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.trenet-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.trenet-nav li a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--trenet-text);
}

.trenet-nav li a:hover,
.trenet-nav li.current-menu-item > a,
.trenet-nav li.current-category-ancestor > a {
  color: var(--trenet-primary);
}

.trenet-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trenet-icon-btn {
  background: var(--trenet-surface);
  border: 1px solid var(--trenet-border);
  color: var(--trenet-dark);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.trenet-icon-btn:hover {
  background: var(--trenet-primary);
  border-color: var(--trenet-primary);
  color: var(--trenet-white);
}

.trenet-mobile-toggle {
  display: none;
}

/* Search Bar Dropdown */
.trenet-search-drawer {
  display: none;
  background: var(--trenet-surface);
  border-top: 1px solid var(--trenet-border);
  padding: 14px 0;
}

.trenet-search-drawer.is-open {
  display: block;
}

.trenet-search-form {
  display: flex;
  gap: 8px;
  max-width: 680px;
  margin: 0 auto;
}

.trenet-search-form input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--trenet-border);
  border-radius: var(--trenet-radius);
  font-size: 15px;
  outline: none;
}

.trenet-search-form input[type="search"]:focus {
  border-color: var(--trenet-primary);
}

.trenet-btn {
  background: var(--trenet-primary);
  color: var(--trenet-white);
  border: none;
  padding: 10px 18px;
  border-radius: var(--trenet-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.trenet-btn:hover {
  background: var(--trenet-primary-dark);
  color: var(--trenet-white);
}

/* Breaking News Ticker */
.trenet-ticker {
  background: var(--trenet-surface);
  border-bottom: 1px solid var(--trenet-border);
  padding: 9px 0;
}

.trenet-ticker-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.trenet-ticker-label {
  background: var(--trenet-primary);
  color: var(--trenet-white);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.trenet-ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 22px;
}

.trenet-ticker-item {
  position: absolute;
  inset: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.trenet-ticker-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Category Badge */
.trenet-badge {
  display: inline-block;
  background: var(--trenet-primary);
  color: var(--trenet-white);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 3px;
  line-height: 1.3;
}

.trenet-badge:hover {
  background: var(--trenet-primary-dark);
  color: var(--trenet-white);
}

/* Hero Featured Grid */
.trenet-hero {
  padding: 24px 0 12px;
}

.trenet-hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

.trenet-hero-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trenet-hero-card {
  position: relative;
  border-radius: var(--trenet-radius);
  overflow: hidden;
  background: var(--trenet-dark-2);
  min-height: 215px;
}

.trenet-hero-card--lead {
  min-height: 442px;
}

.trenet-hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.trenet-hero-card:hover img {
  transform: scale(1.04);
}

.trenet-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 35%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: var(--trenet-white);
}

.trenet-hero-card--lead .trenet-hero-title {
  font-size: 26px;
  line-height: 1.22;
}

.trenet-hero-title {
  margin: 8px 0 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--trenet-white);
}

.trenet-hero-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Main Content + Sidebar */
.trenet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding: 24px 0 48px;
}

/* Section Headers */
.trenet-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--trenet-dark);
  margin-bottom: 18px;
  padding-bottom: 8px;
}

.trenet-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trenet-section-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--trenet-primary);
  border-radius: 2px;
}

.trenet-section-more {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--trenet-primary);
}

/* Article Grid & Cards */
.trenet-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.trenet-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.trenet-card {
  display: flex;
  flex-direction: column;
  background: var(--trenet-white);
}

.trenet-card-thumb {
  position: relative;
  border-radius: var(--trenet-radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--trenet-surface);
  margin-bottom: 10px;
}

.trenet-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.trenet-card:hover .trenet-card-thumb img {
  transform: scale(1.04);
}

.trenet-card-thumb .trenet-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
}

.trenet-card-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.32;
}

.trenet-card-meta {
  font-size: 12px;
  color: var(--trenet-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.trenet-card-excerpt {
  margin: 0;
  font-size: 14px;
  color: #4a4a4a;
  line-height: 1.5;
}

/* Compact Horizontal Card */
.trenet-compact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trenet-compact-card {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.trenet-compact-thumb {
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: var(--trenet-surface);
}

.trenet-compact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trenet-compact-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

/* Magazine Split Block */
.trenet-block {
  margin-top: 34px;
}

.trenet-split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
  align-items: start;
}

/* Sidebar */
.trenet-sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.trenet-widget {
  background: var(--trenet-white);
}

.trenet-widget-box {
  background: var(--trenet-surface);
  border: 1px solid var(--trenet-border);
  border-radius: var(--trenet-radius);
  padding: 18px;
}

.trenet-app-cta {
  background: linear-gradient(135deg, var(--trenet-dark) 0%, #262626 100%);
  color: var(--trenet-white);
  border-radius: var(--trenet-radius);
  padding: 20px;
}

.trenet-app-cta h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.trenet-app-cta p {
  margin: 0 0 14px;
  font-size: 13px;
  color: #d4d4d4;
}

.trenet-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trenet-cat-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  background: var(--trenet-surface);
  border: 1px solid var(--trenet-border);
  border-radius: 20px;
}

.trenet-cat-pill:hover {
  background: var(--trenet-primary);
  border-color: var(--trenet-primary);
  color: var(--trenet-white);
}

/* Single Post */
.trenet-article-header {
  margin-bottom: 22px;
}

.trenet-breadcrumbs {
  font-size: 12px;
  color: var(--trenet-muted);
  margin-bottom: 12px;
}

.trenet-article-title {
  margin: 10px 0 12px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.trenet-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--trenet-muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--trenet-border);
}

.trenet-article-featured {
  border-radius: var(--trenet-radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.trenet-article-content {
  font-family: var(--trenet-font-serif);
  font-size: 17px;
  line-height: 1.8;
  color: #222222;
}

.trenet-article-content p {
  margin: 0 0 1.3em;
}

.trenet-article-content h2,
.trenet-article-content h3 {
  font-family: var(--trenet-font-sans);
  margin: 1.6em 0 0.6em;
  line-height: 1.3;
}

.trenet-article-content blockquote {
  border-left: 4px solid var(--trenet-primary);
  margin: 1.5em 0;
  padding: 8px 18px;
  background: var(--trenet-surface);
  font-style: italic;
}

.trenet-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0;
  padding: 14px 0;
  border-top: 1px solid var(--trenet-border);
  border-bottom: 1px solid var(--trenet-border);
}

.trenet-share-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 4px;
  background: var(--trenet-surface);
  border: 1px solid var(--trenet-border);
  cursor: pointer;
}

.trenet-share-btn:hover {
  background: var(--trenet-primary);
  border-color: var(--trenet-primary);
  color: var(--trenet-white);
}

/* Archive Banner */
.trenet-archive-header {
  background: var(--trenet-surface);
  border-bottom: 1px solid var(--trenet-border);
  padding: 26px 0;
  margin-bottom: 12px;
}

.trenet-archive-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
}

.trenet-archive-header p {
  margin: 0;
  color: var(--trenet-muted);
  font-size: 14px;
}

/* Pagination */
.trenet-pagination {
  margin-top: 30px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.trenet-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--trenet-border);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}

.trenet-pagination .page-numbers.current,
.trenet-pagination .page-numbers:hover {
  background: var(--trenet-primary);
  border-color: var(--trenet-primary);
  color: var(--trenet-white);
}

/* Footer */
.trenet-footer {
  background: var(--trenet-dark);
  color: #cccccc;
  padding: 48px 0 24px;
  margin-top: 24px;
}

.trenet-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid #262626;
}

.trenet-footer h4 {
  color: var(--trenet-white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}

.trenet-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trenet-footer li {
  margin-bottom: 8px;
  font-size: 14px;
}

.trenet-footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #888888;
}

/* Responsive */
@media (max-width: 1024px) {
  .trenet-hero-grid {
    grid-template-columns: 1fr;
  }
  .trenet-hero-card--lead {
    min-height: 340px;
  }
  .trenet-layout {
    grid-template-columns: 1fr;
  }
  .trenet-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .trenet-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--trenet-white);
    border-bottom: 1px solid var(--trenet-border);
    padding: 12px 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  }
  .trenet-nav.is-open {
    display: block;
  }
  .trenet-nav ul {
    flex-direction: column;
    align-items: stretch;
  }
  .trenet-mobile-toggle {
    display: inline-flex;
  }
  .trenet-hero-side,
  .trenet-grid-2,
  .trenet-grid-3,
  .trenet-split,
  .trenet-footer-grid {
    grid-template-columns: 1fr;
  }
  .trenet-article-title {
    font-size: 26px;
  }
}
