/*
Theme Name: NewsNI Theme
Theme URI: https://github.com/google/newsni-theme
Author: Antigravity
Author URI: https://deepmind.google/
Description: A modern WordPress theme replicating the classic, clean layout, typography, and red accents of the BBC News website, customized for NewsNI.
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: newsni-theme
Tags: two-columns, right-sidebar, grid-layout, news, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ==========================================
   CSS Variables & Design System
   ========================================== */
:root {
  --newsni-red: #b80000;
  --newsni-red-hover: #900000;
  --newsni-dark-gray: #1f1f1f;
  --newsni-header-black: #0c0c0c;
  --newsni-bg-light: #f6f6f6;
  --newsni-text-dark: #212121;
  --newsni-text-muted: #5a5a5a;
  --newsni-border-color: #e2e2e2;
  --newsni-white: #ffffff;
  
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, serif;
  
  --max-width: 1200px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   Resets & Base Styles
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--newsni-bg-light);
  color: var(--newsni-text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

/* ==========================================
   Layout Structure
   ========================================== */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

.site-content {
  flex: 1;
  padding: 24px 0;
}

/* ==========================================
   Header Component & Navigation
   ========================================== */
.site-header {
  background-color: var(--newsni-white);
  border-bottom: 1px solid var(--newsni-border-color);
}

/* Top Bar (Level 1 Menu + Logo) */
.newsni-top-bar {
  background-color: var(--newsni-header-black);
  color: var(--newsni-white);
  height: 48px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1000;
  transition: var(--transition-smooth);
}

.newsni-top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.newsni-logo-wrapper {
  display: flex;
  align-items: center;
}

.newsni-logo {
  display: flex;
  gap: 3px;
  margin-right: 16px;
}

.newsni-logo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--newsni-white);
  color: var(--newsni-header-black);
  font-weight: 900;
  font-size: 15px;
  width: 22px;
  height: 22px;
  text-transform: uppercase;
}

/* Hamburger toggle button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--newsni-white);
  cursor: pointer;
  padding: 8px;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.menu-toggle:focus {
  outline: none;
}

.menu-toggle svg {
  transition: var(--transition-smooth);
}

.menu-toggle.active svg {
  transform: rotate(90deg);
}

.menu-toggle.active .line-2 {
  opacity: 0;
}

.menu-toggle.active .line-1 {
  transform: translateY(6px) rotate(45deg);
  transform-origin: center;
}

.menu-toggle.active .line-3 {
  transform: translateY(-6px) rotate(-45deg);
  transform-origin: center;
}

/* Top Navigation Lists */
.top-nav-menu-wrapper {
  display: block;
}

.newsni-top-bar-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 600;
}

.newsni-top-bar-links a {
  display: block;
  padding: 4px 0;
  position: relative;
}

.newsni-top-bar-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--newsni-red);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.newsni-top-bar-links a:hover::after,
.newsni-top-bar-links a.active::after {
  transform: scaleX(1);
}

/* Red News Banner */
.newsni-news-banner {
  background-color: var(--newsni-red);
  color: var(--newsni-white);
  padding: 16px 0;
  transition: var(--transition-smooth);
}

.newsni-news-banner .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.newsni-news-logo {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
}

.newsni-news-logo a {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.newsni-news-logo span {
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

.newsni-search-form {
  position: relative;
  display: flex;
}

.newsni-search-input {
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid transparent;
  color: var(--newsni-white);
  padding: 8px 12px;
  padding-right: 40px;
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 14px;
  width: 240px;
  transition: var(--transition-smooth);
}

.newsni-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsni-search-input:focus {
  outline: none;
  background-color: var(--newsni-white);
  color: var(--newsni-text-dark);
  border-color: var(--newsni-border-color);
}

.newsni-search-submit {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 40px;
  background: none;
  border: none;
  color: var(--newsni-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.newsni-search-input:focus + .newsni-search-submit {
  color: var(--newsni-text-dark);
}

/* White Sub-Navigation Bar (Level 2 + Level 3 Dropdowns) */
.newsni-nav-bar {
  background-color: var(--newsni-white);
  border-bottom: 1px solid var(--newsni-border-color);
}

.newsni-nav-bar ul {
  display: flex;
  flex-wrap: wrap;
}

.newsni-nav-bar li {
  position: relative;
}

.newsni-nav-bar li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #3f3f3f;
  white-space: nowrap;
  position: relative;
}

.newsni-nav-bar li a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--newsni-red);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.newsni-nav-bar li a:hover {
  color: var(--newsni-red);
}

.newsni-nav-bar li a:hover::after,
.newsni-nav-bar li.current-menu-item a::after,
.newsni-nav-bar li.current-post-ancestor a::after {
  transform: scaleX(1);
}

/* Tertiary Navigation Bar (Level 3 Bar) */
.newsni-tertiary-bar {
  background-color: #f2f2f2;
  border-bottom: 1px solid var(--newsni-border-color);
  overflow-x: auto;
  scrollbar-width: none;
}

.newsni-tertiary-bar::-webkit-scrollbar {
  display: none;
}

.newsni-tertiary-bar ul {
  display: flex;
}

.newsni-tertiary-bar li {
  position: relative;
}

.newsni-tertiary-bar li a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #555555;
  white-space: nowrap;
  position: relative;
}

.newsni-tertiary-bar li a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--newsni-red);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

.newsni-tertiary-bar li a:hover {
  color: var(--newsni-red);
}

.newsni-tertiary-bar li a:hover::after,
.newsni-tertiary-bar li a.active::after {
  transform: scaleX(1);
}

.newsni-tertiary-bar li a.active {
  color: var(--newsni-red);
}

/* ==========================================
   Home/Index Grid Layout (BBC News replica)
   ========================================== */

/* Main layout grid for index pages */
.newsni-main-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

/* Hero Section (Left of Sidebar) */
.newsni-hero-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .newsni-hero-section {
    grid-template-columns: 3fr 2fr;
  }
}

/* Big Hero Card */
.hero-main-post {
  background-color: var(--newsni-white);
  border-bottom: 4px solid var(--newsni-red);
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hero-main-post:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.hero-main-post .post-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.hero-main-post .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.hero-main-post:hover .post-thumbnail img {
  transform: scale(1.03);
}

.hero-main-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-main-post .post-category {
  color: var(--newsni-red);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.hero-main-post h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--newsni-text-dark);
}

.hero-main-post h2 a:hover {
  color: var(--newsni-red);
}

.hero-main-post .post-excerpt {
  color: var(--newsni-text-muted);
  font-size: 15px;
  margin-bottom: 16px;
  flex-grow: 1;
}

.hero-main-post .post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--newsni-text-muted);
  border-top: 1px solid var(--newsni-border-color);
  padding-top: 12px;
}

/* Secondary Hero List */
.hero-secondary-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.secondary-card {
  background-color: var(--newsni-white);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
  border-left: 3px solid var(--newsni-border-color);
  transition: var(--transition-smooth);
}

.secondary-card:hover {
  border-left-color: var(--newsni-red);
  box-shadow: var(--shadow-hover);
  transform: translateX(2px);
}

.secondary-card .post-category {
  color: var(--newsni-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.secondary-card h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.secondary-card h3 a:hover {
  color: var(--newsni-red);
}

.secondary-card .post-meta {
  font-size: 11px;
  color: var(--newsni-text-muted);
}

/* General News Grid Section */
.section-header {
  border-bottom: 2px solid var(--newsni-text-dark);
  margin-bottom: 20px;
  padding-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 800;
  position: relative;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 4px;
  background-color: var(--newsni-red);
}

.newsni-news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 600px) {
  .newsni-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.news-card {
  background-color: var(--newsni-white);
  box-shadow: var(--shadow-subtle);
  border-bottom: 3px solid var(--newsni-border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.news-card:hover {
  box-shadow: var(--shadow-hover);
  border-bottom-color: var(--newsni-red);
  transform: translateY(-2px);
}

.news-card .post-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.news-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.news-card:hover .post-thumbnail img {
  transform: scale(1.03);
}

.news-card-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card .post-category {
  color: var(--newsni-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.news-card h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--newsni-text-dark);
}

.news-card h3 a:hover {
  color: var(--newsni-red);
}

.news-card .post-excerpt {
  color: var(--newsni-text-muted);
  font-size: 13px;
  margin-bottom: 12px;
  flex-grow: 1;
}

.news-card .post-meta {
  font-size: 11px;
  color: var(--newsni-text-muted);
  border-top: 1px solid var(--newsni-border-color);
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
}

/* ==========================================
   Sidebar Components
   ========================================== */
.newsni-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.widget {
  background-color: var(--newsni-white);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
  border-top: 3px solid var(--newsni-red);
}

.widget-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--newsni-text-dark);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--newsni-border-color);
  padding-bottom: 8px;
}

/* Most Read Widget list */
.most-read-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.most-read-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dotted var(--newsni-border-color);
}

.most-read-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.most-read-number {
  font-size: 32px;
  font-weight: 900;
  color: var(--newsni-red);
  line-height: 1;
  min-width: 32px;
}

.most-read-text h4 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.most-read-text h4 a:hover {
  color: var(--newsni-red);
}

.most-read-text .post-meta {
  font-size: 11px;
  color: var(--newsni-text-muted);
  margin-top: 4px;
}

/* ==========================================
   Single Post Layout
   ========================================== */
.entry-card {
  background-color: var(--newsni-white);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .entry-card {
    padding: 40px;
  }
}

.entry-header {
  margin-bottom: 24px;
}

.entry-header .post-category {
  display: inline-block;
  color: var(--newsni-white);
  background-color: var(--newsni-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.entry-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--newsni-text-dark);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .entry-title {
    font-size: 40px;
  }
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--newsni-text-muted);
  border-top: 1px solid var(--newsni-border-color);
  border-bottom: 1px solid var(--newsni-border-color);
  padding: 12px 0;
}

.entry-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.post-featured-image {
  margin-bottom: 24px;
  aspect-ratio: 16/9;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-content {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.7;
  color: #333333;
}

@media (min-width: 768px) {
  .entry-content {
    font-size: 19px;
  }
}

.entry-content p {
  margin-bottom: 20px;
}

.entry-content h2, 
.entry-content h3, 
.entry-content h4 {
  font-family: var(--font-primary);
  font-weight: 800;
  color: var(--newsni-text-dark);
  margin-top: 32px;
  margin-bottom: 16px;
}

.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 20px; }

.entry-content blockquote {
  border-left: 4px solid var(--newsni-red);
  padding-left: 20px;
  margin: 30px 0;
  font-style: italic;
  color: var(--newsni-text-muted);
}

.entry-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--newsni-border-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tags a {
  background-color: var(--newsni-bg-light);
  color: var(--newsni-text-muted);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  font-family: var(--font-primary);
}

.post-tags a:hover {
  background-color: var(--newsni-red);
  color: var(--newsni-white);
}

/* Comments Section */
.comments-area {
  background-color: var(--newsni-white);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  margin-top: 30px;
}

.comments-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--newsni-border-color);
  padding-bottom: 8px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.comment-body {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.comment-avatar {
  border-radius: 50%;
  overflow: hidden;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.comment-content {
  flex-grow: 1;
}

.comment-meta {
  margin-bottom: 6px;
}

.comment-author {
  font-weight: 700;
  margin-right: 8px;
}

.comment-metadata {
  font-size: 12px;
  color: var(--newsni-text-muted);
}

.comment-reply-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--newsni-red);
}

/* Comment Form styling */
.comment-respond {
  border-top: 1px solid var(--newsni-border-color);
  padding-top: 24px;
}

.comment-reply-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--newsni-border-color);
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: 14px;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--newsni-red);
}

.comment-form .form-submit input[type="submit"] {
  background-color: var(--newsni-red);
  color: var(--newsni-white);
  border: none;
  padding: 10px 24px;
  font-family: var(--font-primary);
  font-weight: 700;
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.comment-form .form-submit input[type="submit"]:hover {
  background-color: var(--newsni-red-hover);
}

/* ==========================================
   Navigation / Pagination Components
   ========================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0;
}

.pagination .page-numbers {
  background-color: var(--newsni-white);
  border: 1px solid var(--newsni-border-color);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
}

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

/* ==========================================
   Footer Component
   ========================================== */
.site-footer {
  background-color: var(--newsni-dark-gray);
  color: #c4c4c4;
  padding: 40px 0;
  font-size: 14px;
  border-top: 5px solid var(--newsni-red);
}

.footer-logo {
  display: flex;
  gap: 3px;
  margin-bottom: 24px;
}

.footer-logo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #333333;
  color: var(--newsni-white);
  font-weight: 900;
  font-size: 15px;
  width: 22px;
  height: 22px;
  text-transform: uppercase;
}

.site-footer a {
  color: #c4c4c4;
}

.site-footer a:hover {
  color: var(--newsni-white);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  border-bottom: 1px solid #333333;
  padding-bottom: 30px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-widget-title {
  color: var(--newsni-white);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* ==========================================
   WordPress Core Classes
   ========================================== */
.aligncenter {
  display: block;
  margin: 20px auto;
}

.alignleft {
  float: left;
  margin: 0 20px 20px 0;
}

.alignright {
  float: right;
  margin: 0 0 20px 20px;
}

.wp-caption {
  background: var(--newsni-bg-light);
  border: 1px solid var(--newsni-border-color);
  padding: 8px;
  text-align: center;
  max-width: 100%;
  margin-bottom: 20px;
}

.wp-caption-text {
  font-size: 12px;
  color: var(--newsni-text-muted);
  margin-top: 4px;
  font-family: var(--font-primary);
}

.gallery-caption {
  font-size: 12px;
  color: var(--newsni-text-muted);
}

/* Screen Reader Text for Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* ==========================================
   Responsive Utilities & Media Queries
   ========================================== */

/* Main Layout Grid & Spacing Rules */
@media (max-width: 768px) {
  /* Site Containers */
  .site-content {
    padding: 16px 0;
  }

  /* Main Columns Stacking */
  .newsni-main-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Top Utility Bar Stacking & Hamburger */
  .newsni-top-bar {
    height: 48px;
  }
  
  .newsni-top-bar .container {
    display: flex;
    flex-direction: row; /* Keep logo and hamburger side by side */
    justify-content: space-between;
    align-items: center;
  }

  .newsni-logo-wrapper {
    margin-left: 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  /* Slide-out mobile menu containing Top Tier links */
  .top-nav-menu-wrapper {
    position: fixed;
    top: 48px;
    right: -280px;
    width: 280px;
    height: calc(100vh - 48px);
    background-color: var(--newsni-header-black);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    padding: 20px 0;
    overflow-y: auto;
    transition: var(--transition-smooth);
  }

  .top-nav-menu-wrapper.active {
    right: 0;
  }

  .newsni-top-bar-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
    font-size: 15px;
  }

  .newsni-top-bar-links li {
    width: 100%;
  }

  .newsni-top-bar-links a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid #1a1a1a;
    color: #e2e2e2;
  }

  .newsni-top-bar-links a::after {
    display: none; /* Hide hover lines in mobile panel */
  }

  .newsni-top-bar-links a:hover,
  .newsni-top-bar-links a.active {
    background-color: #1c1c1c;
    color: var(--newsni-white);
    border-left: 4px solid var(--newsni-red);
    padding-left: 20px;
  }

  /* Red Brand Banner Stacking */
  .newsni-news-banner {
    padding: 16px 0;
  }

  .newsni-news-banner .container {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }

  .newsni-news-logo {
    font-size: 26px;
  }

  .newsni-news-logo a {
    justify-content: center;
  }

  /* Mobile Search Form (100% width on mobile) */
  .newsni-search-form {
    width: 100%;
    max-width: 340px;
  }

  .newsni-search-input {
    width: 100%;
  }

  /* White Sub-Nav Scrollable Bar on Mobile */
  .newsni-nav-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .newsni-nav-bar::-webkit-scrollbar {
    display: none;
  }

  .newsni-nav-bar ul {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping so it scrolls horizontally */
  }

  .newsni-nav-bar li a {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* Mobile Level 3 Horizontal Scroll */
  .newsni-tertiary-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .newsni-tertiary-bar::-webkit-scrollbar {
    display: none;
  }

  .newsni-tertiary-bar ul {
    display: flex;
    flex-wrap: nowrap;
  }

  .newsni-tertiary-bar li a {
    padding: 10px 14px;
    font-size: 12px;
  }

  /* Hero Section Stacking */
  .newsni-hero-section {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .hero-main-post h2 {
    font-size: 22px;
  }

  .hero-main-content {
    padding: 18px;
  }

  /* Single Article Padding adjustment for tiny screens */
  .entry-card {
    padding: 20px 16px;
  }

  .entry-title {
    font-size: 24px;
    line-height: 1.25;
  }

  .entry-content {
    font-size: 16px;
  }

  /* Footer Links Grid */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  /* Tiny mobile screens */
  .newsni-logo span {
    font-size: 12px;
    width: 18px;
    height: 18px;
    font-weight: 800;
  }

  .newsni-logo {
    gap: 2px;
    margin-right: 0;
  }

  .newsni-news-logo {
    font-size: 22px;
  }

  .news-card-content {
    padding: 12px;
  }

  .news-card h3 {
    font-size: 15px;
  }
}
