/*
Theme Name: Daily News Pro
Theme URI: https://example.com/daily-news-pro
Author: Custom Theme
Author URI: https://example.com
Description: A modern news and blog submission theme with frontend post submission, breaking news ticker, category sections, and full WordPress admin moderation support.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
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: daily-news-pro
Tags: news, blog, magazine, submission, two-columns, three-columns, custom-header, custom-menu, featured-images, post-formats
*/

/* =========================================
   CSS VARIABLES
   ========================================= */
:root {
  --primary: #e8212a;
  --primary-dark: #c0171f;
  --secondary: #1a1a2e;
  --dark: #0d0d0d;
  --dark-2: #1a1a1a;
  --dark-3: #222222;
  --mid: #444444;
  --light-gray: #f4f4f4;
  --border: #e0e0e0;
  --white: #ffffff;
  --text: #2c2c2c;
  --text-muted: #777777;
  --blue-accent: #1976d2;
  --green-badge: #2e7d32;
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Source Sans Pro', 'Helvetica Neue', sans-serif;
  --font-mono: 'Courier New', monospace;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.18);
  --radius: 3px;
  --transition: 0.22s ease;
  --container: 1220px;
  --header-height: 56px;
}

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

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
ul, ol { list-style: none; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--dark);
  font-weight: 700;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin-bottom: 1.2rem;
}

.entry-content ul { list-style: disc; padding-left: 1.5rem; }
.entry-content ol { list-style: decimal; padding-left: 1.5rem; }

/* =========================================
   LAYOUT UTILITIES
   ========================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section-pad { padding: 48px 0; }
.section-pad-sm { padding: 28px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

/* =========================================
   BADGES / CATEGORY LABELS
   ========================================= */
.badge {
  display: inline-block;
  padding: 2px 9px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 2px;
  background: var(--primary);
  color: var(--white);
}

.badge-blue { background: var(--blue-accent); }
.badge-green { background: var(--green-badge); }
.badge-dark { background: var(--dark-3); }
.badge-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

/* =========================================
   TOP BAR
   ========================================= */
.top-bar {
  background: var(--dark);
  color: #aaa;
  font-size: 0.78rem;
  padding: 6px 0;
  border-bottom: 1px solid #333;
}

.top-bar a { color: #ccc; }
.top-bar a:hover { color: var(--primary); }

.top-bar .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #444;
  border-radius: 50%;
  font-size: 0.7rem;
  transition: all var(--transition);
}

.top-bar .social-links a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* =========================================
   SITE HEADER
   ========================================= */
.site-header {
  background: var(--white);
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.03em;
  text-align: center;
}

.site-title span { color: var(--primary); }

.site-description {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-ad {
  min-height: 80px;
  background: var(--light-gray);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* =========================================
   NAVIGATION
   ========================================= */
.main-nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu > li > a {
  display: block;
  color: #ddd;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 13px;
  transition: all var(--transition);
  position: relative;
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 13px;
  right: 13px;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-menu > li:hover > a,
.nav-menu > li.current-menu-item > a {
  color: var(--white);
}

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

.nav-search-btn {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: 8px;
  font-size: 1rem;
  transition: color var(--transition);
}

.nav-search-btn:hover { color: white; }

/* Dropdown */
.nav-menu li { position: relative; }

.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--dark-2);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  border-top: 2px solid var(--primary);
  z-index: 100;
}

.nav-menu li:hover .sub-menu { display: block; }

.nav-menu .sub-menu li a {
  display: block;
  color: #ccc;
  font-size: 0.8rem;
  padding: 10px 16px;
  border-bottom: 1px solid #333;
  transition: all var(--transition);
}

.nav-menu .sub-menu li a:hover {
  background: var(--dark-3);
  color: var(--primary);
  padding-left: 22px;
}

/* =========================================
   MEGA MENU
   ========================================= */

/* Chevron icon next to parent items */
.menu-chevron {
  font-size: 0.55rem;
  margin-left: 3px;
  vertical-align: middle;
  display: inline-block;
  transition: transform var(--transition);
}

.nav-menu > li.has-mega-menu:hover .menu-chevron,
.nav-menu > li.has-mega-menu.mega-open .menu-chevron {
  transform: rotate(180deg);
}

/* Standard dropdown arrow for non-mega parents */
.nav-menu > li:not(.has-mega-menu) > a .menu-chevron {
  /* same behaviour */
}

/* ── Mega panel container ── */
.nav-menu > li.has-mega-menu {
  position: static; /* Break out of relative so panel spans full nav */
}

.mega-menu-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--dark-2);
  border-top: 3px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  z-index: 200;
  padding: 0;
  animation: megaFadeIn .18s ease;
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-menu > li.has-mega-menu:hover .mega-menu-panel,
.nav-menu > li.has-mega-menu.mega-open .mega-menu-panel {
  display: block;
}

/* ── Inner list: horizontal grid of child categories ── */
.mega-menu-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-menu-list > li {
  flex: 0 0 auto;
  min-width: 160px;
  border-right: 1px solid rgba(255,255,255,.06);
}

.mega-menu-list > li:last-child {
  border-right: none;
}

/* Category label (parent of child group) */
.mega-menu-list > li > a {
  display: block;
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 20px 10px;
  border-bottom: 2px solid var(--primary);
  transition: color var(--transition);
  white-space: nowrap;
}

.mega-menu-list > li > a:hover {
  color: var(--primary);
}

/* Grandchild list */
.mega-menu-list > li > .sub-menu {
  display: block !important; /* always visible inside mega panel */
  position: static;
  background: transparent;
  border: none;
  box-shadow: none;
  min-width: 0;
  padding: 8px 0 14px;
}

.mega-menu-list > li > .sub-menu li a {
  display: block;
  color: #bbb;
  font-size: 0.8rem;
  padding: 7px 20px;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.mega-menu-list > li > .sub-menu li a:hover {
  color: var(--primary);
  padding-left: 26px;
  background: transparent;
}

/* ── Mega menu: mobile behaviour ── */
@media (max-width: 768px) {
  .mega-menu-panel {
    position: static;
    border-top: none;
    box-shadow: none;
    animation: none;
    background: var(--dark-3);
    display: none;
  }

  .nav-menu.open > li.has-mega-menu.mega-open .mega-menu-panel {
    display: block;
  }

  .mega-menu-list {
    flex-direction: column;
  }

  .mega-menu-list > li {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  .mega-menu-list > li > a {
    padding: 10px 24px;
    font-size: 0.76rem;
  }

  .mega-menu-list > li > .sub-menu li a {
    padding: 7px 36px;
    font-size: 0.79rem;
  }

  /* Toggle button for mobile mega items */
  .nav-menu > li.has-mega-menu > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}


.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #ddd;
  display: block;
  transition: all var(--transition);
}

/* =========================================
   BREAKING NEWS TICKER
   ========================================= */
.breaking-ticker {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 38px;
}

.ticker-label {
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 60px;
  animation: ticker-scroll 35s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-track a {
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.ticker-track a:hover { color: var(--primary); }

.ticker-dot {
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================
   HERO / FEATURED SLIDER
   ========================================= */
.hero-section {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 48px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.hero-badge { margin-bottom: 12px; }

.hero-title {
  font-size: 2.6rem;
  color: white;
  font-weight: 900;
  max-width: 620px;
  line-height: 1.18;
  margin-bottom: 12px;
}

.hero-excerpt {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
  max-width: 520px;
  margin-bottom: 16px;
}

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

.hero-thumbnails {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 300px;
  background: rgba(0,0,0,0.6);
  flex-direction: column;
}

.hero-thumb-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background var(--transition);
}

.hero-thumb-item:hover,
.hero-thumb-item.active { background: rgba(232,33,42,0.2); }

.hero-thumb-item img {
  width: 75px;
  height: 55px;
  object-fit: cover;
  flex-shrink: 0;
}

.hero-thumb-info .badge { margin-bottom: 4px; }

.hero-thumb-title {
  font-size: 0.78rem;
  color: white;
  line-height: 1.3;
  font-family: var(--font-heading);
  font-weight: 700;
}

.hero-thumb-date {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.slider-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.slider-dot.active {
  background: var(--primary);
  width: 24px;
  border-radius: 4px;
}

.slider-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
  z-index: 10;
}

.slider-arrow {
  pointer-events: all;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition);
  border-radius: 2px;
}

.slider-arrow:hover { background: var(--primary); border-color: var(--primary); }

/* =========================================
   SECTION HEADERS
   ========================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 22px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dark);
  position: relative;
  padding-left: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: var(--primary);
}

.section-more {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-more:hover { color: var(--primary-dark); }

/* =========================================
   ARTICLE CARDS
   ========================================= */
.article-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-thumb {
  position: relative;
  overflow: hidden;
  background: var(--light-gray);
}

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

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

.card-thumb .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
}

.card-body { padding: 14px 0 10px; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--dark);
}

.card-title a:hover { color: var(--primary); }

.card-excerpt {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card sizes */
.card-thumb-lg { height: 240px; }
.card-thumb-md { height: 185px; }
.card-thumb-sm { height: 140px; }
.card-thumb-xs { height: 110px; }

/* Horizontal card */
.article-card-h {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.article-card-h .card-thumb {
  width: 105px;
  height: 78px;
  flex-shrink: 0;
  border-radius: var(--radius);
}

.article-card-h .card-body { padding: 0; }

.article-card-h .card-title { font-size: 0.88rem; margin-bottom: 5px; }

/* Featured large card */
.article-card-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 380px;
}

.article-card-featured .card-thumb {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 0;
}

.article-card-featured .card-thumb img { height: 100%; filter: brightness(0.55); }

.article-card-featured .card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.article-card-featured .card-title {
  color: white;
  font-size: 1.25rem;
}

.article-card-featured .card-meta { color: rgba(255,255,255,0.65); }

.article-card-featured .card-excerpt { color: rgba(255,255,255,0.7); -webkit-line-clamp: 2; }

/* =========================================
   BREAKING NEWS SECTION
   ========================================= */
.breaking-section { padding: 40px 0; }

.breaking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.breaking-main {}

.breaking-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.breaking-list-item {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}

.breaking-list-item:last-child { border-bottom: none; }

.breaking-list-item .card-thumb {
  width: 100px;
  height: 72px;
  flex-shrink: 0;
}

/* =========================================
   APP DOWNLOAD BANNER
   ========================================= */
.app-banner {
  background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #1565c0 100%);
  padding: 28px 0;
  margin: 0;
}

.app-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.app-banner-text h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.app-banner-text p {
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem;
  margin: 0;
}

.app-store-btns {
  display: flex;
  gap: 12px;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dark);
  color: white;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 1px solid rgba(255,255,255,0.15);
}

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

.app-store-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* =========================================
   EDITOR'S CHOICE SECTION
   ========================================= */
.editors-section { padding: 40px 0; background: var(--light-gray); }

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

/* =========================================
   WORTH READING SIDEBAR STYLE
   ========================================= */
.worth-reading-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.worth-reading-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.worth-reading-item:last-child { border-bottom: none; }

.worth-reading-item .card-thumb {
  width: 88px;
  height: 66px;
  flex-shrink: 0;
}

.worth-reading-item .item-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

.worth-reading-item .item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* =========================================
   SUBSCRIBE WIDGET
   ========================================= */
.subscribe-widget {
  background: var(--secondary);
  padding: 24px;
  border-radius: var(--radius);
  color: white;
}

.subscribe-widget h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.subscribe-widget p {
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

.subscribe-form input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  color: white;
  font-size: 0.85rem;
  margin-bottom: 8px;
  outline: none;
  transition: border-color var(--transition);
}

.subscribe-form input::placeholder { color: rgba(255,255,255,0.4); }
.subscribe-form input:focus { border-color: var(--primary); }

.subscribe-form button {
  width: 100%;
  padding: 10px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
}

.subscribe-form button:hover { background: var(--primary-dark); }

/* =========================================
   DARK VIDEO SECTION
   ========================================= */
.video-section {
  background: var(--dark);
  padding: 56px 0;
  color: white;
}

.video-section-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
}

.video-section .section-title { color: white; }
.video-section .section-title::before { background: var(--primary); }

.video-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 300px;
  background: #111;
  cursor: pointer;
}

.video-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.video-featured:hover img { opacity: 0.85; }

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(232,33,42,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  transition: all var(--transition);
  box-shadow: 0 0 0 0 rgba(232,33,42,0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,33,42,0.4); }
  70% { box-shadow: 0 0 0 12px rgba(232,33,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,33,42,0); }
}

.video-featured-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  color: white;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-list-item {
  display: flex;
  gap: 12px;
  cursor: pointer;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.video-list-item:last-child { border-bottom: none; }

.video-thumb {
  position: relative;
  width: 110px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 2px;
  overflow: hidden;
  background: #222;
}

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

.video-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  color: white;
  font-size: 1.1rem;
  transition: background var(--transition);
}

.video-list-item:hover .video-thumb-play { background: rgba(232,33,42,0.6); }

.video-item-info .item-title {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.video-item-info .item-meta { font-size: 0.7rem; color: rgba(255,255,255,0.45); }

.video-news-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-news-item {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.video-news-item a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
}

.video-news-item a:hover { color: var(--primary); }

.video-news-item .meta { font-size: 0.68rem; color: rgba(255,255,255,0.35); margin-top: 3px; }

/* =========================================
   THREE COLUMN CATEGORY SECTIONS
   ========================================= */
.cat-sections { padding: 40px 0; }

.cat-sections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.cat-section-block {}

.cat-main-card {
  margin-bottom: 18px;
}

.cat-main-card .card-thumb { height: 200px; }

.cat-sub-list { display: flex; flex-direction: column; gap: 14px; }

/* =========================================
   CONTENT + SIDEBAR LAYOUT
   ========================================= */
.content-sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  padding: 40px 0;
}

.sidebar {}

.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.widget-header {
  background: var(--dark);
  padding: 12px 18px;
}

.widget-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.widget-body { padding: 18px; }

/* =========================================
   NEWSLETTER FOOTER BANNER
   ========================================= */
.newsletter-banner {
  background: var(--secondary);
  padding: 28px 0;
}

.newsletter-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.newsletter-banner h3 {
  color: white;
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.newsletter-banner p {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin: 0;
}

.newsletter-form {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  width: 380px;
}

.newsletter-form input {
  flex: 1;
  padding: 11px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-right: none;
  color: white;
  font-size: 0.85rem;
  outline: none;
  border-radius: var(--radius) 0 0 var(--radius);
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.35); }

.newsletter-form button {
  padding: 11px 22px;
  background: var(--primary);
  color: white;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover { background: var(--primary-dark); }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: var(--dark-2);
  color: #999;
  padding: 48px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
}

.footer-about .site-title {
  text-align: left;
  font-size: 1.6rem;
  color: white;
  margin-bottom: 12px;
}

.footer-about p {
  font-size: 0.83rem;
  line-height: 1.7;
  margin-bottom: 18px;
  color: #777;
}

.footer-social {
  display: flex;
  gap: 8px;
}

.footer-social a {
  width: 32px;
  height: 32px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.8rem;
  transition: all var(--transition);
}

.footer-social a:hover { background: var(--primary); color: white; }

.footer-widget h4 {
  color: white;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #333;
  font-family: var(--font-body);
}

.footer-links { display: flex; flex-direction: column; gap: 8px; }

.footer-links a {
  font-size: 0.83rem;
  color: #777;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p { font-size: 0.78rem; color: #555; margin: 0; }

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  font-size: 0.78rem;
  color: #555;
}

.footer-bottom-links a:hover { color: var(--primary); }

.footer-logo-bottom {
  padding: 18px 0;
  text-align: center;
  border-top: 1px solid #2a2a2a;
}

.footer-logo-bottom .site-title {
  text-align: center;
  font-size: 1.2rem;
  color: white;
}

/* =========================================
   SUBMIT BLOG PAGE
   ========================================= */
.submit-page {
  padding: 56px 0;
  background: var(--light-gray);
  min-height: 80vh;
}

.submit-container {
  max-width: 800px;
  margin: 0 auto;
}

.submit-header {
  text-align: center;
  margin-bottom: 36px;
}

.submit-header h1 { font-size: 2rem; margin-bottom: 8px; }
.submit-header p { color: var(--text-muted); font-size: 0.92rem; }

.submit-form-card {
  background: white;
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  padding: 40px;
}

.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-label span { color: var(--primary); }

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,33,42,0.1);
}

.form-control.textarea { height: 220px; resize: vertical; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--primary);
  background: rgba(232,33,42,0.03);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.file-upload-text { font-size: 0.88rem; color: var(--text-muted); }
.file-upload-text strong { color: var(--primary); }

.file-preview {
  display: none;
  margin-top: 12px;
  position: relative;
}

.file-preview img {
  max-height: 200px;
  border-radius: var(--radius);
  margin: 0 auto;
}

.file-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-hint { font-size: 0.76rem; color: var(--text-muted); margin-top: 5px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.char-count { font-size: 0.72rem; color: var(--text-muted); text-align: right; margin-top: 4px; }

.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}

.submit-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,33,42,0.3); }

.submit-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

.login-prompt {
  text-align: center;
  padding: 20px;
  background: var(--light-gray);
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.login-prompt a { color: var(--primary); font-weight: 700; }

.success-message {
  display: none;
  background: #e8f5e9;
  border: 1px solid #4caf50;
  border-left: 4px solid #4caf50;
  padding: 20px 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.success-message h4 { color: #2e7d32; font-size: 1rem; margin-bottom: 6px; }
.success-message p { color: #388e3c; font-size: 0.85rem; margin: 0; }

.error-message {
  display: none;
  background: #ffebee;
  border: 1px solid #f44336;
  border-left: 4px solid #f44336;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: #c62828;
  margin-bottom: 16px;
}

/* Tags input */
.tags-input-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  cursor: text;
  min-height: 44px;
  transition: border-color var(--transition);
}

.tags-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,33,42,0.1);
}

.tag-chip {
  background: var(--light-gray);
  border: 1px solid var(--border);
  padding: 3px 8px 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tag-chip .remove-tag {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
}

.tag-chip .remove-tag:hover { color: var(--primary); }

.tags-input {
  border: none;
  outline: none;
  font-size: 0.88rem;
  flex: 1;
  min-width: 120px;
  padding: 2px 0;
}

/* =========================================
   SINGLE POST
   ========================================= */
.single-post-layout { padding: 40px 0; }

.post-header { margin-bottom: 28px; }

.post-header .badge { margin-bottom: 14px; }

.post-title { font-size: 2.2rem; margin-bottom: 16px; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.post-meta .author {
  font-weight: 700;
  color: var(--dark);
}

.post-featured-image {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 28px;
}

.entry-content { font-size: 0.96rem; line-height: 1.8; }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.post-tag {
  padding: 4px 12px;
  background: var(--light-gray);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.post-tag:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Pending post notice */
.pending-notice {
  background: #fff3e0;
  border: 1px solid #ff9800;
  border-left: 4px solid #ff9800;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: #e65100;
  margin-bottom: 24px;
}

/* =========================================
   SEARCH OVERLAY
   ========================================= */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-overlay.open { display: flex; }

.search-overlay-inner {
  width: 100%;
  max-width: 640px;
  padding: 0 20px;
}

.search-overlay-input {
  width: 100%;
  padding: 18px 20px;
  font-size: 1.4rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  color: white;
  outline: none;
  font-family: var(--font-heading);
}

.search-overlay-input::placeholder { color: rgba(255,255,255,0.35); }

.search-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.search-close:hover { opacity: 1; }

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 36px 0;
}

.page-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  background: white;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* =========================================
   404 PAGE
   ========================================= */
.page-404 {
  text-align: center;
  padding: 100px 20px;
}

.page-404 .code { font-size: 8rem; font-weight: 900; color: var(--primary); line-height: 1; }
.page-404 h2 { font-size: 1.8rem; margin-bottom: 12px; }
.page-404 p { color: var(--text-muted); margin-bottom: 28px; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .video-section-layout { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .breaking-layout,
  .cat-sections-grid,
  .editors-grid { grid-template-columns: 1fr 1fr; }

  .content-sidebar-layout { grid-template-columns: 1fr; }

  .hero-title { font-size: 1.9rem; }

  .app-banner-inner,
  .newsletter-banner-inner { flex-direction: column; text-align: center; }

  .newsletter-form { width: 100%; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }

  .nav-menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-2);
    padding: 8px 0;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.open > li > a { padding: 12px 20px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .breaking-layout,
  .cat-sections-grid,
  .editors-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .hero-slider { height: 360px; }
  .hero-title { font-size: 1.5rem; }
  .hero-content { padding: 20px; }

  .form-grid-2 { grid-template-columns: 1fr; }

  .submit-form-card { padding: 24px; }
}

@media (max-width: 480px) {
  .top-bar .flex-between { flex-direction: column; gap: 6px; text-align: center; }
  h1 { font-size: 1.9rem; }
  .hero-title { font-size: 1.3rem; }
}

/* =========================================
   PRINT STYLES
   ========================================= */
@media print {
  .main-nav, .breaking-ticker, .hero-section,
  .app-banner, .video-section, .sidebar,
  .site-footer, .newsletter-banner { display: none; }
}

/* =========================================
   WORDPRESS SPECIFIC
   ========================================= */
.alignleft { float: left; margin: 0 20px 16px 0; }
.alignright { float: right; margin: 0 0 16px 20px; }
.aligncenter { margin: 0 auto 16px; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin-top: 4px; }

.admin-bar .main-nav { top: 32px; }
@media (max-width: 782px) { .admin-bar .main-nav { top: 46px; } }

/* Screen reader text */
.screen-reader-text {
  position: absolute;
  left: -9999em;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================================
   MOBILE RESPONSIVE FIXES
   (Ranking Assets - Mobile Patch)
   ========================================= */

/* ── TOP BAR ── */
@media (max-width: 768px) {
  .top-bar .container.flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 16px;
  }

  .top-bar .flex.flex-center.gap-16:first-child {
    font-size: 0.72rem;
  }

  /* Hide date text on very small screens to save space */
  @media (max-width: 400px) {
    .top-bar .flex.flex-center.gap-16:first-child span:first-child {
      display: none;
    }
  }

  .top-bar .social-links {
    gap: 5px;
  }

  .top-bar .social-links a {
    width: 22px;
    height: 22px;
  }

  /* Auth links: Sign In / Register / Dashboard / Sign Out */
  .top-bar .flex-between > div:last-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── SITE HEADER ── */
@media (max-width: 768px) {
  .site-header {
    padding: 12px 0;
  }

  .site-header .container > .flex-between {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  /* Hide the spacer divs that push logo left/right on desktop */
  .site-header .container > .flex-between > div[style*="flex:1"]:first-child {
    display: none;
  }

  .site-header .container > .flex-between > div[style*="flex:1"]:last-child {
    display: flex;
    justify-content: center;
    width: 100%;
    flex: unset;
  }

  .site-title {
    font-size: 1.6rem;
  }

  .site-description {
    font-size: 0.7rem;
  }

  /* Submit Blog + Sign In buttons row */
  .site-header .container > .flex-between > div:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: unset;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.35rem;
  }
}

/* ── NAV BAR ── */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0 16px;
    min-height: 48px;
  }

  .nav-menu.open {
    z-index: 999;
  }

  /* Make mobile menu items larger/touch-friendly */
  .nav-menu.open > li > a {
    padding: 14px 20px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
  }
}

/* ── BREAKING TICKER ── */
@media (max-width: 768px) {
  .breaking-ticker {
    height: 34px;
  }

  .ticker-label {
    font-size: 0.65rem;
    padding: 0 10px;
    letter-spacing: 0.06em;
  }

  .ticker-track a {
    font-size: 0.78rem;
  }
}

/* ── HERO SECTION ── */
@media (max-width: 768px) {
  .hero-slider {
    height: 280px;
  }

  .hero-content {
    padding: 14px 16px;
  }

  .hero-title {
    font-size: 1.15rem;
    margin-bottom: 8px;
  }

  .hero-excerpt {
    display: none;
  }

  .hero-meta {
    font-size: 0.7rem;
    gap: 8px;
    flex-wrap: wrap;
  }

  .slider-arrow {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    height: 220px;
  }

  .hero-title {
    font-size: 1rem;
  }
}

/* ── CONTENT SECTIONS (Features, Breaking, Cat sections) ── */
@media (max-width: 768px) {
  .breaking-section {
    padding: 24px 0;
  }

  .breaking-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cat-sections {
    padding: 24px 0;
  }

  .cat-sections-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .editors-section {
    padding: 24px 0;
  }

  .editors-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .editors-grid {
    grid-template-columns: 1fr;
  }
}

/* ── ARTICLE CARDS ── */
@media (max-width: 768px) {
  .article-card-featured {
    height: 260px;
  }

  .card-thumb-lg { height: 200px; }
  .card-thumb-md { height: 160px; }

  .article-card-h .card-thumb {
    width: 90px;
    height: 68px;
  }
}

/* ── CONTENT + SIDEBAR LAYOUT (Single Post, pages) ── */
@media (max-width: 768px) {
  /* Override the inline style grid on single.php */
  .content-sidebar-layout .container > div[style*="grid-template-columns"] {
    display: block !important;
  }

  .content-sidebar-layout .container > div[style*="grid-template-columns"] > main {
    width: 100%;
  }

  .content-sidebar-layout .container > div[style*="grid-template-columns"] > aside {
    width: 100%;
    margin-top: 32px;
  }

  /* Post title */
  .post-title {
    font-size: 1.5rem;
  }

  /* Post meta wrapping */
  .post-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.76rem;
  }

  /* Featured image */
  .post-featured-image {
    max-height: 240px;
    border-radius: 2px;
  }

  /* Author box */
  div[style*="display:flex;gap:18px;align-items:flex-start"] {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }

  /* Related posts grid */
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .post-title {
    font-size: 1.25rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .entry-content {
    font-size: 0.92rem;
  }
}

/* ── SIDEBAR WIDGETS ── */
@media (max-width: 768px) {
  /* Worth reading: show 2 columns on tablet */
  .worth-reading-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .worth-reading-item {
    flex-direction: column;
    padding-bottom: 0;
    border-bottom: none;
  }

  .worth-reading-item .card-thumb {
    width: 100%;
    height: 120px;
  }
}

@media (max-width: 480px) {
  .worth-reading-list {
    grid-template-columns: 1fr;
  }

  .worth-reading-item {
    flex-direction: row;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
  }

  .worth-reading-item .card-thumb {
    width: 88px;
    height: 66px;
  }
}

/* ── SUBSCRIBE WIDGET ── */
@media (max-width: 768px) {
  .subscribe-widget {
    padding: 20px;
  }
}

/* ── FOOTER ── */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

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

  .footer-bottom-links {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ── APP BANNER ── */
@media (max-width: 768px) {
  .app-banner-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .app-store-btns {
    justify-content: center;
  }
}

/* ── NEWSLETTER BANNER ── */
@media (max-width: 768px) {
  .newsletter-banner-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .newsletter-form {
    width: 100%;
    max-width: 400px;
  }
}

/* ── SECTION HEADERS ── */
@media (max-width: 768px) {
  .section-title {
    font-size: 1rem;
  }
}

/* ── SUBMIT PAGE ── */
@media (max-width: 768px) {
  .submit-page {
    padding: 32px 0;
  }

  .submit-form-card {
    padding: 20px 16px;
  }

  .submit-header h1 {
    font-size: 1.5rem;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ── GENERAL CONTAINER PADDING ON MOBILE ── */
@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .section-pad {
    padding: 32px 0;
  }
}

/* ── TOUCH-FRIENDLY IMPROVEMENTS ── */
@media (max-width: 768px) {
  /* Bigger tap targets for nav toggle */
  .nav-toggle {
    padding: 10px;
  }

  .nav-toggle span {
    width: 26px;
  }

  /* Search button */
  .nav-search-btn {
    padding: 10px;
  }

  /* Post tags wrapping */
  .post-tags {
    gap: 6px;
  }

  .post-tag {
    font-size: 0.74rem;
    padding: 5px 10px;
  }
}

/* ── FIX INLINE STYLES THAT BREAK ON MOBILE ── */
/* Single post layout override (inline grid in single.php) */
@media (max-width: 768px) {
  /* Target the inline-styled grid wrapper inside .content-sidebar-layout */
  .content-sidebar-layout > .container > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  .content-sidebar-layout > .container > div > main,
  .content-sidebar-layout > .container > div > aside {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* ── SEARCH OVERLAY MOBILE ── */
@media (max-width: 480px) {
  .search-overlay-input {
    font-size: 1.1rem;
    padding: 14px 16px;
  }

  .search-close {
    top: 16px;
    right: 16px;
    font-size: 1.5rem;
  }
}


/* ── SINGLE POST GRID (replaces inline style) ── */
.single-post-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
}

@media (max-width: 768px) {
  .single-post-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  .single-post-grid > main,
  .single-post-grid > aside {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* =========================================
   MOBILE PATCH 2 - Features / Worth Reading / Subscribe
   ========================================= */

/* Desktop layout for features + worth-reading grid */
.features-worth-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}

/* Features editors-grid: 3 cols on desktop */
.features-worth-grid .editors-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  /* Collapse the features grid to 2 columns on tablet */
  .features-worth-grid .editors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Full-width features, hide the sidebar column entirely */
  .features-worth-grid {
    display: block;
  }

  /* Hide Worth Reading + Subscribe Now on mobile */
  .worth-subscribe-sidebar {
    display: none !important;
  }

  /* Features grid: 2 columns on mobile */
  .features-worth-grid .editors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Slightly smaller card thumbs so 2 cols fit nicely */
  .features-worth-grid .card-thumb-sm {
    height: 120px;
  }

  .features-worth-grid .card-title {
    font-size: 0.88rem;
  }
}

@media (max-width: 400px) {
  /* Single column on very small phones */
  .features-worth-grid .editors-grid {
    grid-template-columns: 1fr;
  }

  .features-worth-grid .card-thumb-sm {
    height: 160px;
  }
}

/* Also hide sidebar subscribe widget on mobile (single post sidebar) */
@media (max-width: 768px) {
  .sidebar .subscribe-widget,
  .sidebar .worth-reading-list,
  .sidebar .worth-reading-item {
    display: none !important;
  }
}


/* =========================================
   AUTH PAGES: LOGIN & REGISTER
   ========================================= */

/* --- Page Wrapper --- */
.auth-page-wrap {
    padding: 48px 0 72px;
    min-height: 70vh;
    background: var(--light-gray);
}

/* --- Split layout (Login) --- */
.auth-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    max-width: 960px;
    margin: 0 auto;
    min-height: 560px;
}

/* --- Image Panel --- */
.auth-image-panel {
    position: relative;
    overflow: hidden;
}
.auth-image-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.auth-image-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
}
.auth-image-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
}
.auth-image-overlay {
    position: absolute;
    bottom: 40px;
    left: 36px;
    right: 36px;
    color: white;
}
.auth-image-overlay h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: white;
    margin-bottom: 8px;
}
.auth-image-overlay p {
    color: rgba(255,255,255,0.75);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Form Panel (Login) --- */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 48px;
    background: var(--white);
}
.auth-form-inner {
    width: 100%;
    max-width: 380px;
}

/* --- Register layout --- */
.auth-register-layout {
    max-width: 680px;
    margin: 0 auto;
}
.auth-register-header {
    text-align: center;
    margin-bottom: 28px;
}
.auth-register-card {
    background: var(--white);
    border-radius: 6px;
    padding: 40px 48px;
    box-shadow: var(--shadow-lg);
}
.auth-full-card {
    background: var(--white);
    border-radius: 6px;
    padding: 40px 48px;
    box-shadow: var(--shadow-lg);
}

/* --- Brand / Site Title --- */
.auth-brand {
    margin-bottom: 24px;
}
.auth-site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.auth-site-title span {
    color: var(--primary);
}

/* --- Headings --- */
.auth-heading {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    color: var(--dark);
    margin-bottom: 6px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.auth-subheading {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 28px;
}

/* --- Alert / Error / Success --- */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.86rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.auth-alert svg { flex-shrink: 0; margin-top: 1px; }
.auth-alert-error {
    background: #fff0f0;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}
.auth-alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}
.auth-alert-success strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.auth-alert-success p { margin: 0; color: #15803d; font-size: 0.85rem; }

/* --- Fields --- */
.auth-field {
    margin-bottom: 18px;
}
.auth-field label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.auth-required {
    color: var(--primary);
    font-size: 0.9rem;
}
.auth-label-link {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--blue-accent);
    text-transform: none;
    letter-spacing: 0;
}
.auth-label-link:hover { color: var(--primary); }

/* --- Input Wrap --- */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}
.auth-input {
    width: 100%;
    padding: 10px 42px 10px 38px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.auth-input-wrap:not(:has(.auth-input-icon)) .auth-input {
    padding-left: 14px;
}
.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 33, 42, 0.12);
}
.auth-input::placeholder { color: #bbb; }

/* Toggle password button */
.auth-toggle-pw {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    line-height: 1;
    transition: color var(--transition);
}
.auth-toggle-pw:hover { color: var(--primary); }

/* --- Row split (name fields) --- */
.auth-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* --- Checkbox --- */
.auth-row-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
}
.auth-checkbox-label input[type="checkbox"] {
    display: none;
}
.auth-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--border);
    border-radius: 3px;
    background: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}
.auth-checkbox-label input:checked + .auth-checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}
.auth-checkbox-label input:checked + .auth-checkbox-custom::after {
    content: '';
    width: 9px;
    height: 6px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
    display: block;
}

/* --- Submit Button --- */
.auth-btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    margin-bottom: 20px;
}
.auth-btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(232, 33, 42, 0.35);
    transform: translateY(-1px);
    color: white;
}
.auth-btn-primary:active { transform: translateY(0); }

/* --- Divider --- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --- Switch link --- */
.auth-switch-link {
    text-align: center;
    font-size: 0.86rem;
    color: var(--text-muted);
}
.auth-switch-link a {
    color: var(--blue-accent);
    font-weight: 600;
}
.auth-switch-link a:hover { color: var(--primary); }
.auth-switch-link span { margin: 0 6px; color: var(--border); }

/* --- Password Strength --- */
.auth-pw-strength {
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    margin-top: 8px;
    overflow: hidden;
}
.pw-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.3s ease, background 0.3s ease;
}
.auth-pw-label {
    font-size: 0.75rem;
    font-weight: 600;
    display: block;
    margin-top: 4px;
    min-height: 1em;
}

/* --- reCAPTCHA --- */
.auth-recaptcha-wrap {
    display: flex;
    justify-content: flex-start;
}
.auth-recaptcha-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 18px;
}

/* =========================================
   AUTH PAGES: RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .auth-split-layout {
        grid-template-columns: 1fr;
    }
    .auth-image-panel {
        display: none;
    }
    .auth-form-panel {
        padding: 36px 28px;
    }
    .auth-register-card,
    .auth-full-card {
        padding: 28px 20px;
    }
    .auth-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .auth-page-wrap {
        padding: 24px 0 48px;
    }
}

