/*
Theme Name: RedTop
Theme URI: https://example.com/redtop
Author: Ziggy
Description: A tabloid-style classic WordPress theme inspired by red-top newspaper layouts. Sticky red masthead, breaking news ticker, full-bleed hero story, story grids with two-tone headlines, status badges, and a dark footer. Customize colors and the ticker under Appearance > Customize > RedTop Style.
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: redtop
Tags: news, blog, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, sticky-post, threaded-comments
*/

:root {
	--red: #d8232a;
	--accent: #d8232a;
	--red-dark: #a8151b;
	--ink: #141414;
	--gray: #6b6b6b;
	--line: #e3e3e3;
	--light: #f4f4f4;
	--dark: #111111;
	--blue: #1a6fd4;
	--purple: #7b2fbe;
	--green: #1e9e4a;
	--pink: #d63384;
	--orange: #e67e02;
	--teal: #0e8a7b;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Roboto', Arial, Helvetica, sans-serif;
	color: var(--ink);
	background: #fff;
	line-height: 1.55;
}

h1, h2, h3, h4, .site-title, .nav-menu, .ticker-label, .kicker, .badge, .widget-title {
	font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Utility strip ---------- */
.utility-strip { background: var(--dark); color: #bbb; font-size: 12px; }
.utility-inner { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.utility-links a { color: #ddd; margin-left: 16px; }

/* ---------- Masthead ---------- */
.masthead { background: var(--red); color: #fff; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; }
.site-title { color: #fff; font-size: 42px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; line-height: 1; }
.site-title:hover { text-decoration: none; color: #fff; }
.site-tagline { display: block; font-size: 12px; font-family: 'Roboto', Arial, sans-serif; letter-spacing: 2px; opacity: .85; }
.custom-logo { max-height: 60px; width: auto; }
.masthead-tools { display: flex; align-items: center; gap: 14px; }
.search-toggle, .menu-toggle {
	background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; padding: 6px;
}
.menu-toggle { display: none; }
.signin-link { color: #fff; font-weight: 700; font-size: 14px; text-transform: uppercase; }
.search-drawer { background: var(--red-dark); padding: 12px 0; }
.search-drawer .search-form { display: flex; gap: 8px; }
.search-drawer input[type="search"] { flex: 1; padding: 10px; border: 0; font-size: 16px; }
.search-drawer input[type="submit"] { background: var(--dark); color: #fff; border: 0; padding: 10px 18px; cursor: pointer; font-weight: 700; }

/* ---------- Primary nav (sticky) ---------- */
.primary-nav { background: var(--red); border-top: 1px solid rgba(255,255,255,.25); position: sticky; top: 0; z-index: 100; }
.nav-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav-menu li { margin: 0; }
.nav-menu a {
	display: block; color: #fff; font-weight: 600; text-transform: uppercase; font-size: 15px;
	padding: 12px 16px; letter-spacing: .5px;
}
.nav-menu a:hover { background: rgba(0,0,0,.18); text-decoration: none; }
.nav-menu .current-menu-item a, .nav-menu .current-category-ancestor a { background: rgba(0,0,0,.28); }

/* ---------- Breaking ticker ---------- */
.ticker { background: var(--dark); color: #fff; overflow: hidden; }
.ticker-inner { display: flex; align-items: stretch; }
.ticker-label {
	background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 1px;
	display: flex; align-items: center; padding: 0 16px; flex-shrink: 0;
}
.ticker-viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker-track { display: inline-flex; align-items: center; white-space: nowrap; animation: ticker-scroll 40s linear infinite; padding: 8px 0; }
.ticker-track a { color: #fff; font-size: 14px; }
.ticker-sep { color: var(--accent); margin: 0 18px; font-weight: 700; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker:hover .ticker-track { animation-play-state: paused; }

/* ---------- Layout ---------- */
.site-main { padding: 24px 0 40px; }
.content-wrap { display: flex; gap: 32px; align-items: flex-start; }
.main-col { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 28px; border-bottom: 4px solid var(--ink); padding-bottom: 20px; }
.hero-link { position: relative; display: block; }
.hero-link:hover { text-decoration: none; }
.hero-img { width: 100%; }
.hero-overlay {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 48px 20px 16px;
	background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.hero-cat { margin-bottom: 6px; }
.hero-title { color: #fff; font-size: 44px; line-height: 1.05; margin: 0; text-transform: uppercase; }
.hero-excerpt { font-size: 16px; color: #333; margin: 12px 0 8px; }
.hero-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--gray); }
.comment-count { color: var(--gray); font-weight: 700; }
.comment-count::before { content: "\1F4AC  "; }

/* ---------- Two-tone headlines, kickers, badges, labels ---------- */
.kicker { color: var(--accent); text-transform: uppercase; }
.badge {
	display: inline-block; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 1px;
	padding: 3px 10px; text-transform: uppercase; margin-bottom: 6px;
}
.badge-exclusive { background: var(--blue); }
.badge-live { background: var(--green); }
.hero-link .badge { position: absolute; top: 14px; left: 14px; z-index: 2; }
.card-thumb .badge { position: absolute; top: 8px; left: 8px; z-index: 2; }
.cat-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.cat-label:hover { text-decoration: underline; }
.cat-blue { color: var(--blue); } .cat-purple { color: var(--purple); }
.cat-green { color: var(--green); } .cat-pink { color: var(--pink); }
.cat-orange { color: var(--orange); } .cat-teal { color: var(--teal); }
.cat-red { color: var(--red); }

/* ---------- Story grid cards ---------- */
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 28px; }
.card { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.card-thumb { position: relative; display: block; margin-bottom: 10px; overflow: hidden; }
.card-thumb img { transition: transform .25s ease; }
.card-thumb:hover img { transform: scale(1.03); }
.card-title { font-size: 21px; line-height: 1.15; margin: 0 0 8px; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--accent); text-decoration: none; }
.card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }

/* ---------- Sidebar ---------- */
.sidebar .widget { margin-bottom: 28px; }
.widget-title {
	font-size: 18px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 14px;
	padding-bottom: 8px; border-bottom: 3px solid var(--red);
}
.side-story { display: flex; gap: 12px; margin-bottom: 16px; }
.side-thumb { position: relative; flex-shrink: 0; width: 120px; }
.side-title { font-size: 15px; line-height: 1.25; margin: 0 0 4px; font-family: 'Roboto', Arial, sans-serif; font-weight: 700; }
.side-title a { color: var(--ink); }
.side-meta { font-size: 11px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- Single post / page ---------- */
.single-top { margin-bottom: 8px; display: flex; gap: 10px; align-items: center; }
.single-title { font-size: 40px; line-height: 1.08; margin: 0 0 10px; text-transform: uppercase; }
.single-byline { display: flex; gap: 14px; font-size: 13px; color: var(--gray); margin-bottom: 18px; }
.single-img { margin-bottom: 20px; width: 100%; }
.entry-content { font-size: 17px; }
.entry-content p { margin: 0 0 1.2em; }
.single-tags { margin: 20px 0; }
.single-tags a { background: var(--light); padding: 4px 10px; font-size: 13px; margin-right: 6px; color: var(--ink); }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0; font-size: 14px; font-weight: 700; }

/* ---------- Archive / search headers ---------- */
.archive-header { border-bottom: 4px solid var(--ink); margin-bottom: 24px; padding-bottom: 10px; }
.archive-title { font-size: 34px; text-transform: uppercase; margin: 0; }
.archive-desc { color: var(--gray); font-size: 15px; }

/* ---------- Pagination ---------- */
.pagination { margin: 10px 0 30px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { border: 1px solid var(--line); padding: 8px 14px; color: var(--ink); font-weight: 700; }
.pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--red); color: var(--red); text-decoration: none; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 32px; border-top: 2px solid var(--line); padding-top: 20px; }
.comments-title { font-size: 22px; text-transform: uppercase; }
.comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.comment-list .comment { border-bottom: 1px solid var(--line); padding: 16px 0; }
.comment-list .children { list-style: none; margin-left: 32px; padding: 0; }
.comment-meta { font-size: 13px; color: var(--gray); margin-bottom: 6px; }
.comment-form label { display: block; font-weight: 700; margin: 10px 0 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 10px; border: 1px solid var(--line); font-size: 15px;
}
.comment-form input[type="submit"] {
	background: var(--red); color: #fff; border: 0; padding: 12px 24px; font-weight: 700;
	text-transform: uppercase; cursor: pointer; margin-top: 10px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #bbb; padding: 36px 0 20px; font-size: 14px; }
.footer-top { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 24px; }
.footer-brand { flex: 1 1 220px; }
.footer-site-title { color: #fff; font-family: 'Oswald', Arial, sans-serif; font-size: 30px; text-transform: uppercase; font-weight: 700; }
.footer-follow { font-weight: 700; letter-spacing: 1px; font-size: 13px; margin: 14px 0 8px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
	width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	color: #fff; font-weight: 700; font-size: 18px;
}
.footer-social a:nth-child(1) { background: #1877f2; }
.footer-social a:nth-child(2) { background: #000; border: 1px solid #444; }
.footer-social a:nth-child(3) { background: #25d366; }
.footer-social a:hover { text-decoration: none; opacity: .85; }
.footer-col { flex: 1 1 160px; }
.footer-heading { color: #fff; font-weight: 700; letter-spacing: 1px; font-size: 13px; margin: 0 0 10px; }
.footer-services { flex: 1 1 220px; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-menu a { color: #bbb; font-size: 13px; }
.site-footer .widget-title { color: #fff; border-bottom-color: var(--red); }
.footer-legal { border-top: 1px solid #333; padding-top: 16px; font-size: 12px; color: #888; }

/* ---------- Search form / misc ---------- */
.search-form { display: flex; gap: 8px; margin: 12px 0; }
.search-form input[type="search"] { flex: 1; padding: 10px; border: 1px solid var(--line); font-size: 15px; }
.search-form input[type="submit"] { background: var(--red); color: #fff; border: 0; padding: 10px 18px; font-weight: 700; cursor: pointer; }
.no-results { font-size: 18px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
	.content-wrap { flex-direction: column; }
	.sidebar { width: 100%; }
	.story-grid { grid-template-columns: repeat(2, 1fr); }
	.hero-title { font-size: 32px; }
	.single-title { font-size: 30px; }
}
@media (max-width: 720px) {
	.menu-toggle { display: block; }
	.primary-nav .nav-menu { display: none; flex-direction: column; width: 100%; }
	.primary-nav.nav-open .nav-menu { display: flex; }
	.story-grid { grid-template-columns: 1fr; }
	.hero-title { font-size: 26px; }
	.site-title { font-size: 30px; }
	.signin-link { display: none; }
	.ticker-label { font-size: 12px; padding: 0 10px; }
}
