/*
Theme Name: Tycoon World
Theme URI: https://example.com/tycoon-world
Author: Your Name
Author URI: https://example.com
Description: A bold, red-and-black news/magazine theme with a breaking-news ticker, multi-story hero, category sections, and a trending sidebar. Built for high-traffic news, business, and entertainment sites.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: tycoon-world
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --color-bg: #F4F4F4;
  --color-surface: #FFFFFF;
  --color-ink: #1A1A1A;
  --color-ink-soft: #555555;
  --color-meta: #8A8A8A;
  --color-red: #E41B23;
  --color-line: #E7E7E7;

  --cat-business: #E41B23;
  --cat-startup: #7B2FF7;
  --cat-technology: #1565C0;
  --cat-entertainment: #D6006E;
  --cat-world: #0B6E99;
  --cat-sports: #1C8A3C;
  --cat-default: #333333;

  --font-headline: "Archivo", "Arial Black", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --radius: 2px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

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

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1rem;
}

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* Category badge coloring, driven by data-cat attribute */
.badge { display: inline-block; padding: 0.2em 0.6em; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em; color: #fff; background: var(--cat-default); }
.badge[data-cat="business"] { background: var(--cat-business); }
.badge[data-cat="startup"] { background: var(--cat-startup); }
.badge[data-cat="technology"], .badge[data-cat="tech"] { background: var(--cat-technology); }
.badge[data-cat="entertainment"] { background: var(--cat-entertainment); }
.badge[data-cat="world"] { background: var(--cat-world); }
.badge[data-cat="sports"] { background: var(--cat-sports); }

.section-heading { border-bottom: 3px solid var(--cat-default); text-transform: uppercase;
  font-family: var(--font-headline); font-weight: 800; font-size: 1.1rem; letter-spacing: 0.02em;
  padding-bottom: 0.5rem; margin: 0 0 1rem; display: flex; justify-content: space-between; align-items: baseline; }
.section-heading[data-cat="business"] { border-color: var(--cat-business); color: var(--cat-business); }
.section-heading[data-cat="startup"] { border-color: var(--cat-startup); color: var(--cat-startup); }
.section-heading[data-cat="technology"] { border-color: var(--cat-technology); color: var(--cat-technology); }
.section-heading[data-cat="entertainment"] { border-color: var(--cat-entertainment); color: var(--cat-entertainment); }
.section-heading[data-cat="world"] { border-color: var(--cat-world); color: var(--cat-world); }
.section-heading[data-cat="sports"] { border-color: var(--cat-sports); color: var(--cat-sports); }
.section-heading .view-all { font-size: 0.75rem; font-weight: 600; text-transform: none; color: var(--color-ink-soft); }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
  background: var(--color-ink);
  color: #ddd;
  font-size: 0.8rem;
}
.topbar .wrap { display: flex; align-items: center; gap: 1rem; padding-block: 0.5rem; }
.topbar .topbar-date { white-space: nowrap; color: #aaa; }
.topbar .breaking {
  flex: 1; display: flex; align-items: center; gap: 0.6rem; overflow: hidden;
}
.topbar .breaking-tag {
  background: var(--color-red); color: #fff; font-weight: 700; font-size: 0.7rem;
  padding: 0.15em 0.5em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.topbar .breaking-ticker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .topbar-social { display: flex; gap: 0.75rem; flex-shrink: 0; }
.topbar .topbar-social a { color: #ccc; }
.topbar .topbar-social a:hover { color: #fff; }

/* ==========================================================================
   Masthead
   ========================================================================== */
.masthead { background: var(--color-surface); padding-block: 1.25rem; }
.masthead .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-branding .site-title {
  font-family: var(--font-headline); font-weight: 900; font-size: 2rem; margin: 0;
  text-transform: uppercase; letter-spacing: -0.01em;
}
.site-branding .site-title a { color: var(--color-ink); }
.site-branding .site-title .accent { color: var(--color-red); }
.site-branding .site-description { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--color-meta); }

.ad-slot {
  background: #EDEDED; border: 1px dashed #C9C9C9; color: #999; text-align: center;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.ad-slot .ad-size { font-weight: 700; font-size: 1rem; color: #777; }
.ad-leaderboard { width: 100%; max-width: 728px; height: 90px; margin-inline: auto; }
.ad-mrec { width: 100%; max-width: 300px; height: 250px; margin-inline: auto; }

/* ==========================================================================
   Primary nav
   ========================================================================== */
.primary-nav-wrap { background: var(--color-red); }
.primary-nav-wrap .wrap { display: flex; align-items: center; }
.primary-nav { display: flex; flex-wrap: wrap; }
.primary-nav li a {
  display: block; padding: 0.85rem 1rem; color: #fff; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.02em;
}
.primary-nav li:first-child a { display: flex; align-items: center; gap: 0.4em; }
.primary-nav li a:hover, .primary-nav li.current-menu-item a { background: rgba(0,0,0,0.18); }
.nav-search-toggle {
  margin-left: auto; background: none; border: none; color: #fff; padding: 0.85rem 1rem; cursor: pointer;
}

/* ==========================================================================
   Layout grid
   ========================================================================== */
.content-area { padding-block: 1.5rem; }
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.hero-main {
  position: relative; aspect-ratio: 16/10.5; border-radius: var(--radius); overflow: hidden;
  background: #111;
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.hero-main .hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 20%, rgba(0,0,0,0) 100%);
  color: #fff;
}
.hero-main .badge { margin-bottom: 0.6rem; }
.hero-main .hero-title { font-family: var(--font-headline); font-weight: 800; font-size: 1.6rem; line-height: 1.2; margin: 0 0 0.5rem; }
.hero-main .hero-title a { color: #fff; }
.hero-main .hero-meta { font-size: 0.8rem; color: #ddd; }

.hero-side { display: flex; flex-direction: column; gap: 0.65rem; }
.hero-side-item {
  position: relative; display: flex; align-items: flex-end; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/8; background: #111;
}
.hero-side-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; z-index: 0; }
.hero-side-item .hero-side-caption {
  position: relative; z-index: 1; padding: 0.75rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 30%, rgba(0,0,0,0) 100%);
  color: #fff; width: 100%;
}
.hero-side-item .badge { font-size: 0.62rem; margin-bottom: 0.35rem; }
.hero-side-item .hero-side-title { font-family: var(--font-headline); font-weight: 700; font-size: 0.9rem; line-height: 1.3; margin: 0 0 0.25rem; }
.hero-side-item .hero-side-title a { color: #fff; }
.hero-side-item .hero-side-meta { font-size: 0.7rem; color: #ccc; }

/* ==========================================================================
   Latest news strip
   ========================================================================== */
.latest-news-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.latest-item .thumb { aspect-ratio: 4/3; overflow: hidden; margin-bottom: 0.6rem; border-radius: var(--radius); position: relative; }
.latest-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-item .badge { position: absolute; top: 0.4rem; left: 0.4rem; font-size: 0.6rem; }
.latest-item .latest-title { font-family: var(--font-headline); font-weight: 700; font-size: 0.9rem; line-height: 1.3; margin: 0 0 0.35rem; }
.latest-item .latest-title a { color: var(--color-ink); }
.latest-item .latest-meta { font-size: 0.72rem; color: var(--color-meta); }

/* ==========================================================================
   Category section (featured + list, two per row)
   ========================================================================== */
.category-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.category-block { background: var(--color-surface); }
.category-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; }

.cat-featured { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3.1; background: #111; }
.cat-featured img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.cat-featured .cat-featured-caption {
  position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem; background: linear-gradient(0deg, rgba(0,0,0,0.85) 30%, rgba(0,0,0,0) 100%); color: #fff;
}
.cat-featured .badge { margin-bottom: 0.5rem; align-self: flex-start; }
.cat-featured .cat-featured-title { font-family: var(--font-headline); font-weight: 800; font-size: 1.05rem; line-height: 1.25; margin: 0 0 0.4rem; }
.cat-featured .cat-featured-title a { color: #fff; }
.cat-featured .cat-featured-meta { font-size: 0.72rem; color: #ddd; }

.cat-list { display: flex; flex-direction: column; gap: 0.75rem; }
.cat-list-item { display: flex; gap: 0.6rem; }
.cat-list-item .thumb { width: 64px; height: 52px; flex-shrink: 0; border-radius: var(--radius); overflow: hidden; }
.cat-list-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-list-item .cat-list-title { font-size: 0.82rem; font-weight: 600; line-height: 1.35; margin: 0 0 0.25rem; }
.cat-list-item .cat-list-title a { color: var(--color-ink); }
.cat-list-item .cat-list-meta { font-size: 0.68rem; color: var(--color-meta); }

/* ==========================================================================
   Sidebar widgets
   ========================================================================== */
.widget { background: var(--color-surface); padding: 1.1rem; margin-bottom: 1.5rem; border: 1px solid var(--color-line); }
.widget-title {
  font-family: var(--font-headline); font-weight: 800; text-transform: uppercase; font-size: 0.9rem;
  letter-spacing: 0.02em; border-bottom: 2px solid var(--color-red); padding-bottom: 0.5rem; margin: 0 0 1rem;
}

.follow-list { display: flex; flex-direction: column; gap: 0.75rem; }
.follow-list li a { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; font-weight: 600; }
.follow-list .icon {
  width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.follow-list .icon.facebook { background: #1877F2; }
.follow-list .icon.twitter { background: #111; }
.follow-list .icon.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.follow-list .icon.youtube { background: #FF0000; }
.follow-list .count { margin-left: auto; color: var(--color-meta); font-size: 0.75rem; font-weight: 400; }

.trending-list { display: flex; flex-direction: column; gap: 0.9rem; }
.trending-item { display: flex; gap: 0.7rem; align-items: flex-start; }
.trending-item .rank { font-family: var(--font-headline); font-weight: 900; font-size: 1.3rem; color: var(--color-red); width: 1.6rem; flex-shrink: 0; }
.trending-item .thumb { width: 56px; height: 56px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.trending-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.trending-item .trending-title { font-size: 0.82rem; font-weight: 600; line-height: 1.3; margin: 0 0 0.25rem; }
.trending-item .trending-title a { color: var(--color-ink); }
.trending-item .trending-meta { font-size: 0.68rem; color: var(--color-meta); }

.popular-cats li a {
  display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0;
  border-bottom: 1px solid var(--color-line); font-size: 0.85rem; font-weight: 600;
}
.popular-cats li:last-child a { border-bottom: none; }
.popular-cats li a:hover { color: var(--color-red); }

.newsletter-widget p { font-size: 0.82rem; color: var(--color-ink-soft); margin: 0 0 0.75rem; }
.newsletter-widget input[type="email"] {
  width: 100%; padding: 0.6em 0.8em; border: 1px solid var(--color-line); margin-bottom: 0.6rem;
  font-family: var(--font-body);
}
.newsletter-widget button {
  width: 100%; background: var(--color-red); color: #fff; border: none; padding: 0.7em; font-weight: 700;
  text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.03em; cursor: pointer;
}
.newsletter-widget button:hover { background: #C2151C; }
.newsletter-widget .privacy-note { font-size: 0.7rem; color: var(--color-meta); text-align: center; margin-top: 0.5rem; }

/* ==========================================================================
   Videos + Editor's pick
   ========================================================================== */
.videos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.video-item .thumb { position: relative; aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; margin-bottom: 0.5rem; }
.video-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-item .play-btn {
  position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; background: rgba(0,0,0,0.6);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff;
}
.video-item .duration {
  position: absolute; bottom: 0.4rem; right: 0.4rem; background: rgba(0,0,0,0.75); color: #fff;
  font-size: 0.68rem; padding: 0.1em 0.4em; border-radius: 2px;
}
.video-item .video-title { font-size: 0.85rem; font-weight: 600; line-height: 1.35; margin: 0 0 0.2rem; }
.video-item .video-title a { color: var(--color-ink); }
.video-item .video-meta { font-size: 0.7rem; color: var(--color-meta); }

.editors-pick { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.25rem; }
.editors-pick-feature img { border-radius: var(--radius); margin-bottom: 0.75rem; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.editors-pick-feature .pick-title { font-family: var(--font-headline); font-weight: 800; font-size: 1.2rem; margin: 0 0 0.4rem; }
.editors-pick-feature .pick-title a { color: var(--color-ink); }
.editors-pick-feature .pick-meta { font-size: 0.75rem; color: var(--color-meta); }
.editors-pick-list { display: flex; flex-direction: column; gap: 0.65rem; justify-content: center; }
.editors-pick-list li a { font-size: 0.85rem; font-weight: 600; padding: 0.5rem 0; border-bottom: 1px solid var(--color-line); display: block; }
.editors-pick-list li:last-child a { border-bottom: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--color-ink); color: #ccc; padding-top: 2.5rem; font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid #333; }
.footer-brand .site-title { font-family: var(--font-headline); font-weight: 900; font-size: 1.4rem; color: #fff; text-transform: uppercase; }
.footer-brand .site-title .accent { color: var(--color-red); }
.footer-brand p { color: #999; margin: 0.5rem 0 1rem; max-width: 22rem; }
.footer-social { display: flex; gap: 0.6rem; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 50%; background: #2A2A2A; display: flex; align-items: center;
  justify-content: center; color: #fff;
}
.footer-social a:hover { background: var(--color-red); }
.footer-col h3 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 1rem; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a { color: #aaa; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-block: 1rem; font-size: 0.78rem; color: #888; flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #fff; }

/* ==========================================================================
   Standard blog templates (single, archive, search, 404)
   ========================================================================== */
.page-header { margin-bottom: 1.5rem; }
.page-header .badge { margin-bottom: 0.6rem; }
.page-title { font-family: var(--font-headline); font-weight: 800; font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 0.5rem; }
.entry-meta-line { font-size: 0.8rem; color: var(--color-meta); }
.entry-thumbnail { margin-bottom: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.entry-content { background: var(--color-surface); }
.entry-content > * + * { margin-top: 1.1rem; }
.entry-content h2 { font-family: var(--font-headline); font-size: 1.4rem; margin-top: 2rem; }
.entry-content h3 { font-family: var(--font-headline); font-size: 1.15rem; margin-top: 1.5rem; }
.entry-content a { color: var(--color-red); text-decoration: underline; }
.entry-content blockquote { border-left: 3px solid var(--color-red); padding-left: 1rem; color: var(--color-ink-soft); font-style: italic; }
.entry-content img { border-radius: var(--radius); }
.entry-footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--color-line); font-size: 0.8rem; color: var(--color-meta); }

.post-list-simple { display: flex; flex-direction: column; gap: 1.5rem; }
.post-list-simple .post-list-item { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--color-line); }
.post-list-simple .thumb { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; }
.post-list-simple .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-simple .entry-title { font-family: var(--font-headline); font-weight: 700; font-size: 1.15rem; margin: 0.4rem 0; }
.post-list-simple .entry-title a { color: var(--color-ink); }
.post-list-simple .entry-excerpt { font-size: 0.88rem; color: var(--color-ink-soft); }

.pagination { display: flex; justify-content: space-between; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--color-line); font-size: 0.85rem; font-weight: 600; }

.comments-area { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-line); }
.comments-title { font-family: var(--font-headline); font-size: 1.2rem; margin-bottom: 1rem; }
.comment-list { display: flex; flex-direction: column; }
.comment-list .comment { padding-block: 1rem; border-bottom: 1px solid var(--color-line); }
.comment-author { font-weight: 700; font-size: 0.9rem; }
.comment-metadata { font-size: 0.72rem; color: var(--color-meta); text-transform: uppercase; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 0.6em 0.8em; border: 1px solid var(--color-line); font-family: var(--font-body); margin-top: 0.3rem;
}
.comment-form p { margin-block: 0.75rem; }
.comment-form .form-submit input { background: var(--color-red); color: #fff; border: none; padding: 0.6em 1.4em; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; cursor: pointer; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .layout-with-sidebar { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .category-sections { grid-template-columns: 1fr; }
  .latest-news-grid { grid-template-columns: repeat(3, 1fr); }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .editors-pick { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .masthead .wrap { flex-direction: column; align-items: flex-start; }
  .latest-news-grid { grid-template-columns: repeat(2, 1fr); }
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
  .category-split { grid-template-columns: 1fr; }
  .post-list-simple .post-list-item { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .topbar-date { display: none; }
}
