/*
Theme Name: Frontwave
Theme URI: https://frontwave.space
Author: Frontwave Media
Author URI: https://frontwave.space
Description: A professional US news theme for Frontwave.space — bold, fast, and Google-ready with categories, authors, breaking news ticker, and full editorial layout.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: frontwave
Tags: news, magazine, blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

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

:root {
  --red:    #c0392b;
  --blue:   #1a3a6b;
  --dark:   #0d0d0d;
  --white:  #ffffff;
  --gray:   #f5f4f0;
  --border: #e5e5e5;
  --mid:    #888888;
  --serif:  'Playfair Display', Georgia, serif;
  --sans:   'DM Sans', Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--dark); background: var(--white); line-height: 1.7; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ═══════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); line-height: 1.2; }
p { margin-bottom: 1rem; }

/* ═══════════════════════════════════════════
   TICKER
═══════════════════════════════════════════ */
.fw-ticker { background: var(--blue); color: #ccd; font-size: 12px; padding: 6px 24px; display: flex; justify-content: space-between; align-items: center; }
.fw-ticker-date { letter-spacing: .5px; flex-shrink: 0; }
.fw-ticker-wrap { overflow: hidden; flex: 1; margin: 0 20px; white-space: nowrap; }
.fw-ticker-inner { display: inline-block; animation: fwtick 30s linear infinite; }
.fw-ticker-inner span { margin: 0 32px; color: #fff; }
@keyframes fwtick { 0% { transform: translateX(60vw); } 100% { transform: translateX(-100%); } }
.fw-ticker-site { flex-shrink: 0; font-weight: 600; color: #fff; }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.fw-header { border-bottom: 4px solid var(--blue); padding: 0 24px; background: var(--white); position: sticky; top: 0; z-index: 999; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.fw-header-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.fw-logo { font-family: var(--serif); font-size: 42px; font-weight: 900; letter-spacing: -2px; line-height: 1; }
.fw-logo em { color: var(--red); font-style: normal; }
.fw-logo small { display: block; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: 5px; color: var(--mid); text-transform: uppercase; margin-top: 3px; }
.fw-header-right { text-align: right; font-size: 12px; color: var(--mid); line-height: 1.8; }
.fw-header-right strong { display: block; font-size: 13px; color: var(--dark); font-weight: 600; }

/* ═══════════════════════════════════════════
   NAV
═══════════════════════════════════════════ */
.fw-nav-wrap { border-top: 1px solid var(--border); background: var(--white); }
.fw-nav { max-width: 1140px; margin: 0 auto; padding: 0 24px; display: flex; overflow-x: auto; }
.fw-nav a { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 11px 15px; white-space: nowrap; border-bottom: 3px solid transparent; transition: .15s; color: #444; display: block; }
.fw-nav a:hover, .fw-nav a.current-menu-item { color: var(--red); border-bottom-color: var(--red); }
.fw-nav a.fw-nav-home { color: var(--blue); }

/* ═══════════════════════════════════════════
   BREAKING BANNER
═══════════════════════════════════════════ */
.fw-breaking { background: var(--red); color: #fff; padding: 8px 24px; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.fw-breaking-label { background: #fff; color: var(--red); font-weight: 800; font-size: 10px; letter-spacing: 2px; padding: 3px 8px; text-transform: uppercase; flex-shrink: 0; }
.fw-breaking-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════
   LAYOUT WRAPPER
═══════════════════════════════════════════ */
.fw-container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.fw-main-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 32px 0; }
@media (max-width: 900px) { .fw-main-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════
   HERO POST
═══════════════════════════════════════════ */
.fw-hero { margin-bottom: 28px; }
.fw-hero-img { width: 100%; height: 380px; background: linear-gradient(160deg, #0d1b3e 0%, #1a3a6b 50%, #c0392b 100%); display: flex; align-items: flex-end; padding: 28px; position: relative; overflow: hidden; }
.fw-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fw-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%); }
.fw-hero-content { position: relative; z-index: 2; }
.fw-hero-badge { background: var(--red); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 2px; padding: 3px 10px; text-transform: uppercase; margin-bottom: 10px; display: inline-block; }
.fw-hero h1 { font-family: var(--serif); font-size: 32px; font-weight: 900; color: #fff; line-height: 1.2; margin-bottom: 10px; }
.fw-hero h1 a { color: #fff; }
.fw-hero h1 a:hover { color: #ffd; }
.fw-hero-meta { font-size: 12px; color: rgba(255,255,255,.7); }
.fw-hero-meta strong { color: #fff; }

/* ═══════════════════════════════════════════
   SECTION LABEL
═══════════════════════════════════════════ */
.fw-section-label { font-size: 10px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--blue); border-left: 3px solid var(--red); padding-left: 10px; margin: 24px 0 14px; }

/* ═══════════════════════════════════════════
   STORY LIST
═══════════════════════════════════════════ */
.fw-story-list { display: flex; flex-direction: column; }
.fw-story { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); transition: .15s; }
.fw-story:hover { opacity: .75; }
.fw-story-thumb { width: 90px; height: 72px; flex-shrink: 0; background: var(--blue); overflow: hidden; }
.fw-story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fw-story-cat { font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.fw-story h3 { font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.3; margin-bottom: 5px; }
.fw-story h3 a:hover { color: var(--red); }
.fw-story-meta { font-size: 11px; color: var(--mid); }

/* ═══════════════════════════════════════════
   GRID POSTS (3 col)
═══════════════════════════════════════════ */
.fw-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0; }
@media (max-width: 700px) { .fw-grid-3 { grid-template-columns: 1fr; } }
.fw-card { border: 1px solid var(--border); }
.fw-card-img { height: 160px; background: var(--blue); overflow: hidden; }
.fw-card-img img { width: 100%; height: 100%; object-fit: cover; }
.fw-card-body { padding: 14px; }
.fw-card-cat { font-size: 9px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.fw-card h3 { font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.3; margin-bottom: 6px; }
.fw-card h3 a:hover { color: var(--red); }
.fw-card-meta { font-size: 11px; color: var(--mid); }

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.fw-sidebar { display: flex; flex-direction: column; gap: 24px; }
.fw-widget { border: 1px solid var(--border); }
.fw-widget-title { background: var(--blue); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; padding: 9px 14px; font-family: var(--sans); }

/* Trending */
.fw-trending-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.fw-trending-item:last-child { border-bottom: none; }
.fw-trending-num { font-family: var(--serif); font-size: 26px; font-weight: 900; color: #e0e0e0; line-height: 1; flex-shrink: 0; width: 30px; }
.fw-trending-item p { font-size: 13px; font-weight: 500; line-height: 1.4; margin: 0; }
.fw-trending-item p a:hover { color: var(--red); }
.fw-trending-item span { font-size: 11px; color: var(--mid); display: block; margin-top: 2px; }

/* Opinion */
.fw-opinion-item { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.fw-opinion-item:last-child { border-bottom: none; }
.fw-opinion-author { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.fw-opinion-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; font-family: var(--sans); }
.fw-opinion-name { font-size: 12px; font-weight: 700; }
.fw-opinion-role { font-size: 10px; color: var(--mid); }
.fw-opinion-item blockquote { font-size: 13px; font-style: italic; line-height: 1.5; color: #444; margin: 0; }

/* Newsletter */
.fw-newsletter { background: var(--blue); color: #fff; padding: 18px; }
.fw-newsletter h4 { font-family: var(--serif); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.fw-newsletter p { font-size: 13px; color: #aabbdd; margin-bottom: 14px; }
.fw-newsletter input[type="email"] { width: 100%; padding: 9px 12px; border: none; font-family: var(--sans); font-size: 13px; margin-bottom: 8px; outline: none; }
.fw-newsletter button { width: 100%; background: var(--red); color: #fff; border: none; padding: 10px; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; transition: .15s; }
.fw-newsletter button:hover { background: #a93226; }

/* ═══════════════════════════════════════════
   CATEGORY CARDS
═══════════════════════════════════════════ */
.fw-cats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 16px 0 32px; }
@media (max-width: 700px) { .fw-cats-grid { grid-template-columns: repeat(3, 1fr); } }
.fw-cat-card { padding: 16px 10px; border: 1px solid var(--border); text-align: center; transition: .15s; position: relative; overflow: hidden; }
.fw-cat-card:hover { border-color: var(--blue); background: var(--gray); }
.fw-cat-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; }
.fw-cat-card .cat-icon { font-size: 22px; margin-bottom: 6px; display: block; }
.fw-cat-card .cat-name { font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #555; }

/* ═══════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════ */
.fw-single-wrap { max-width: 1140px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
@media (max-width: 900px) { .fw-single-wrap { grid-template-columns: 1fr; } }
.fw-post-header { margin-bottom: 24px; }
.fw-post-cat-label { display: inline-block; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 2px; padding: 3px 10px; text-transform: uppercase; margin-bottom: 14px; }
.fw-post-title { font-family: var(--serif); font-size: 38px; font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.fw-post-subtitle { font-size: 18px; color: #555; font-weight: 300; margin-bottom: 16px; line-height: 1.5; }
.fw-post-byline { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.fw-byline-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; flex-shrink: 0; }
.fw-byline-name { font-size: 14px; font-weight: 700; }
.fw-byline-meta { font-size: 12px; color: var(--mid); }
.fw-post-featured { width: 100%; height: 420px; object-fit: cover; margin-bottom: 6px; }
.fw-post-caption { font-size: 12px; color: var(--mid); margin-bottom: 24px; font-style: italic; }
.fw-post-content { font-size: 17px; line-height: 1.85; color: #333; }
.fw-post-content h2 { font-family: var(--serif); font-size: 26px; margin: 28px 0 12px; border-left: 4px solid var(--red); padding-left: 12px; }
.fw-post-content p { margin-bottom: 1.4rem; }
.fw-post-content blockquote { border-left: 4px solid var(--blue); padding: 12px 20px; margin: 24px 0; font-style: italic; font-size: 19px; color: #444; background: var(--gray); }
.fw-post-tags { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.fw-post-tags span { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--mid); }
.fw-post-tags a { display: inline-block; background: var(--gray); font-size: 12px; padding: 4px 12px; margin: 4px 4px 0 0; color: var(--dark); border: 1px solid var(--border); }
.fw-post-tags a:hover { background: var(--blue); color: #fff; }

/* ═══════════════════════════════════════════
   AUTHOR BOX
═══════════════════════════════════════════ */
.fw-author-box { border: 1px solid var(--border); padding: 20px; margin-top: 32px; display: flex; gap: 16px; }
.fw-author-box-avatar { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; font-weight: 900; color: #fff; }
.fw-author-box h4 { font-family: var(--serif); font-size: 18px; margin-bottom: 2px; }
.fw-author-box span { font-size: 11px; color: var(--mid); display: block; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.fw-author-box p { font-size: 14px; color: #555; margin: 0; line-height: 1.6; }

/* ═══════════════════════════════════════════
   CATEGORY PAGE
═══════════════════════════════════════════ */
.fw-cat-hero { background: var(--blue); color: #fff; padding: 36px 24px; margin-bottom: 32px; }
.fw-cat-hero small { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: #aabbdd; display: block; margin-bottom: 8px; }
.fw-cat-hero h1 { font-family: var(--serif); font-size: 44px; font-weight: 900; }
.fw-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 700px) { .fw-cat-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
.fw-pagination { display: flex; gap: 8px; margin: 32px 0; }
.fw-pagination a, .fw-pagination span { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.fw-pagination a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.fw-pagination .current { background: var(--red); color: #fff; border-color: var(--red); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.fw-footer { background: var(--dark); color: #aaa; padding: 40px 24px 20px; margin-top: 40px; }
.fw-footer-inner { max-width: 1140px; margin: 0 auto; }
.fw-footer-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid #222; gap: 24px; flex-wrap: wrap; }
.fw-footer-logo { font-family: var(--serif); font-size: 32px; font-weight: 900; color: #fff; }
.fw-footer-logo em { color: var(--red); font-style: normal; }
.fw-footer-logo small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: 3px; color: #555; text-transform: uppercase; margin-top: 4px; }
.fw-footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-bottom: 28px; }
@media (max-width: 700px) { .fw-footer-cols { grid-template-columns: repeat(2, 1fr); } }
.fw-footer-col h5 { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #fff; margin-bottom: 12px; font-family: var(--sans); }
.fw-footer-col a { display: block; font-size: 13px; color: #777; margin-bottom: 8px; transition: .15s; }
.fw-footer-col a:hover { color: #fff; }
.fw-footer-bottom { display: flex; justify-content: space-between; font-size: 11px; color: #444; flex-wrap: wrap; gap: 8px; border-top: 1px solid #1a1a1a; padding-top: 16px; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .fw-logo { font-size: 30px; }
  .fw-hero h1 { font-size: 22px; }
  .fw-hero-img { height: 280px; }
  .fw-ticker { display: none; }
}
