/* =======================================
   BASE RESET
======================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f7f7f7;
  color: #222;
}
a {
  color: inherit;
  text-decoration: none;
}

/* =======================================
   TOP BAR
======================================= */
.top-bar {
  background: #800080;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 16px;
  border-bottom: 1px solid #700070;
}
.top-bar-left {
  flex: 1;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.top-bar-right a {
  color: #fff;
  font-size: 14px;
  transition: color 0.3s;
}
.top-bar-right a:hover {
  color: #ffcc00;
}

@media (max-width: 900px) {
  .top-bar {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
}

/* =======================================
   HEADER
======================================= */
.site-header {
  background: #fff;
  border-bottom: 2px solid #800080;
  position: relative;
  z-index: 1000;
}

/* Logo + Ad Row */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  gap: 20px;
}
.header-left {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
}
.header-right {
  flex: 0 0 70%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Logo */
.brand-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-inner img {
  height: 60px;
}
.site-title {
  display: flex;
  flex-direction: column;
}
.site-name {
  font-size: 20px;
  font-weight: 800;
  color: #800080;
}
.site-tag {
  font-size: 12px;
  color: #666;
}

/* Ad Space */
.ad-placeholder {
  background: #f5f5f5;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 12px 24px;
  color: #666;
  font-weight: 600;
}

/* Navigation Bar */
.main-nav {
  background: #800080;
  border-top: 1px solid #740074;
  border-bottom: 2px solid #6d006d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav li {
  margin: 0;
}
.main-nav a {
  color: #fff;
  font-weight: 700;
  padding: 12px 20px;
  display: block;
  transition: background 0.2s;
}
.main-nav a:hover {
  background: #5e0060;
}

/* Mobile Menu Button */
.menu-btn {
  display: none;
  background: #fff;
  color: #800080;
  border: 2px solid #800080;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
  margin: 10px auto;
}
.menu-btn:hover {
  background: #800080;
  color: #fff;
}

/* =======================================
   STICKY HEADER
======================================= */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 2px solid #800080;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 10000;
  animation: fadeIn 0.4s ease forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sticky-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  max-width: 1200px;
  margin: 0 auto;
}
.sticky-logo img {
  height: 42px;
}
.sticky-nav ul {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.sticky-nav a {
  color: #222;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
}
.sticky-nav a:hover {
  background: #800080;
  color: #fff;
}

/* =======================================
   LAYOUT (GRID & SIDEBAR)
======================================= */
.container-two {
  max-width: 1200px;
  margin: 16px auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 0 12px;
}
.grid-root-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ad-block {
  background: #f0f0f0;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
}
.sidebar-box {
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #eee;
}

/* =======================================
   NEWS STYLES
======================================= */
.source-col {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
}
.source-title {
  font-size: 18px;
  color: #800080;
  margin-bottom: 10px;
}
.source-list-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.news-item {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
  transition: box-shadow 0.2s;
}
.news-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.news-thumb img {
  width: 200px;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
}
.news-content {
  flex: 1;
}
.news-title {
  font-weight: 700;
  color: #1a4e9f;
  font-size: 16px;
}
.news-desc {
  font-size: 14px;
  color: #444;
  margin: 6px 0;
}
.read-more-wrapper {
  text-align: right;
  margin-top: 6px;
}
.read-more {
  color: #800080;
  font-weight: 600;
}
.read-more:hover {
  text-decoration: underline;
}
.news-meta {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

/* =======================================
   FOOTER
======================================= */
.site-footer {
  background: #111;
  color: #ccc;
  text-align: center;
  padding: 16px 8px;
  margin-top: 20px;
  border-top: 2px solid #800080;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 8px;
}
.footer-links a {
  color: #ccc;
  font-weight: 600;
}
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-footer p {
  font-size: 13px;
  color: #aaa;
  margin-top: 6px;
}

/* =======================================
   RESPONSIVE
======================================= */
@media (max-width: 900px) {
  /* Header */
  .header-top {
    flex-direction: column;
    text-align: center;
  }
  .header-left,
  .header-right {
    flex: 1 1 100%;
    justify-content: center;
  }
  .ad-placeholder {
    display: none;
  }

  /* Mobile menu */
  .menu-btn {
    display: block !important;
  }
  .main-nav ul {
    display: none;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }
  .main-nav ul.open {
    display: flex;
  }

  /* Sticky Nav */
  .sticky-nav {
    display: none;
  }
  .sticky-nav.open {
    display: block;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }
  .sticky-nav ul {
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 10px;
  }

  /* Layout */
  .container-two {
    grid-template-columns: 1fr;
  }
  .grid-root-two {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .grid-root-two {
    order: 1;
  }

  /* News */
  .news-item {
    flex-direction: column;
  }
  .news-thumb img {
    width: 100%;
    height: auto;
  }
}
/* ==============================
   MOBILE MENU & RESPONSIVE FIX
============================== */

/* Main and Sticky menu buttons */
.menu-btn {
  display: none;
  background: #fff;
  color: #800080;
  border: 2px solid #800080;
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Right-align the buttons */
.header-top,
.sticky-inner {
  position: relative;
}

.menu-btn {
  position: absolute;
  right: 20px;
  top: 10px;
}

.menu-btn:hover {
  background: #800080;
  color: #fff;
}

/* Mobile nav dropdown (Main header) */
@media (max-width: 900px) {
  /* Hide default desktop menu */
  .main-nav ul {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: #fff;
    padding: 14px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    position: absolute;
    right: 16px;
    left: 16px;
    z-index: 999;
  }

  /* When open */
  .main-nav ul.open {
    display: flex;
    animation: slideDown 0.3s ease forwards;
  }

  /* Fix background flash */
  .main-nav ul.open li a {
    background: transparent;
    color: #333;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
  }
  .main-nav ul.open li:last-child a {
    border-bottom: none;
  }
  .main-nav ul.open li a:hover {
    background: #f8f2fa;
    color: #800080;
  }

  /* Sticky header dropdown */
  .sticky-nav {
    display: none;
  }
  .sticky-nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    border-top: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 12px 20px;
    animation: slideDown 0.3s ease forwards;
    position: absolute;
    top: 58px;
    right: 16px;
    left: 16px;
    border-radius: 6px;
  }
  .sticky-nav.open a {
    color: #333;
    padding: 10px 0;
    width: 100%;
    border-bottom: 1px solid #eee;
  }
  .sticky-nav.open a:hover {
    background: #f8f2fa;
    color: #800080;
  }

  /* Show menu buttons */
  .menu-btn {
    display: block;
  }
}

/* Smooth dropdown animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:Arial,Helvetica,sans-serif;background:#f7f7f7;color:#222}
a{color:inherit;text-decoration:none}

/* Breaking bar */
.breaking-bar{background:#800080;color:#fff;padding:8px 12px;font-weight:700}

/* Two-column layout */
.container-two{max-width:1200px;margin:16px auto;display:grid;grid-template-columns:2fr 1fr;gap:16px;padding:0 12px}
.grid-root-two{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.source-col{background:#fff;border:1px solid #eee;border-radius:8px;padding:12px;display:flex;flex-direction:column}
.source-title{font-size:18px;color:#800080;margin-bottom:10px}

/* Featured story */
.featured{margin-bottom:10px}
.feat-link{display:flex;flex-direction:column;gap:8px}
.feat-thumb img{width:100%;height:auto;border-radius:8px;object-fit:cover}
.feat-title{font-size:17px;color:#1a4e9f;font-weight:700;margin:4px 0}
.feat-desc{color:#444;font-size:14px;margin-bottom:4px}
.feat-meta{font-size:12px;color:#777}

/* Small items */
.source-list{display:flex;flex-direction:column;gap:8px}
.small-item{display:flex;gap:8px;align-items:flex-start}
.si-thumb img{width:90px;height:60px;border-radius:6px;object-fit:cover}
.si-info{flex:1}
.si-title{font-size:14px;font-weight:600;color:#1a4e9f}
.si-meta{font-size:12px;color:#777}

/* Load more */
.load-more-source{text-align:right;margin-top:auto}
.load-more-source a{background:#800080;color:#fff;padding:6px 10px;border-radius:6px;font-size:13px;font-weight:600}

/* Sidebar */
.sidebar{display:flex;flex-direction:column;gap:12px}
.ad-block{background:#f0f0f0;padding:12px;border-radius:8px;text-align:center}
.sidebar-box{background:#fff;padding:12px;border-radius:8px;border:1px solid #eee}

.muted{color:#777;font-style:italic}

/* Source page (formatted like index) */
.source-section{display:flex;flex-direction:column;gap:16px}
.source-featured{background:#fff;border:1px solid #eee;border-radius:8px;padding:10px;display:flex;flex-direction:row;gap:12px}
.sf-link{text-decoration:none;color:inherit;display:flex;gap:12px}
.sf-thumb{width:300px;height:200px;object-fit:cover;border-radius:6px}
.sf-body{flex:1}
.sf-title{color:#1a4e9f;font-size:18px;font-weight:700;margin-bottom:6px}
.sf-desc{color:#444;font-size:14px;margin-bottom:6px}
.sf-meta{font-size:12px;color:#777}

/* smaller list items */
.source-small-list{display:flex;flex-direction:column;gap:10px}
.source-small-item{background:#fff;border:1px solid #eee;border-radius:8px;padding:8px;display:flex;gap:10px;align-items:flex-start}
.ssi-thumb{width:100px;height:64px;object-fit:cover;border-radius:6px}
.ssi-title{font-size:14px;font-weight:600;color:#1a4e9f;text-decoration:none}
.ssi-meta{font-size:12px;color:#777;margin-top:4px}

@media(max-width:800px){
  .source-featured{flex-direction:column}
  .sf-thumb{width:100%;height:auto}
}
/* ==============================
   MOBILE HEADER CLEANUP
============================== */
@media (max-width: 900px) {
  .site-title {
    display: none;
  }
}
/* =======================================
   FEATURED STORY LAYOUT
======================================= */
.featured {
  margin-bottom: 12px;
}
.feat-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.feat-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.feat-content {
  flex: 1;
}
.feat-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a4e9f;
  margin-bottom: 6px;
}
.feat-desc {
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}

/* On smaller screens, stack vertically */
@media (max-width: 800px) {
  .feat-link {
    flex-direction: column;
  }
  .feat-thumb img {
    width: 100%;
    height: auto;
  }
}

/* =======================================
   DRAGGABLE BOXES (USER REORDER)
======================================= */
.grid-root-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .grid-root-two {
    grid-template-columns: 1fr;
  }
}

/* Visual feedback while dragging */
.source-col {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.source-col.dragging {
  opacity: 0.7;
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* =======================================
   HOME PAGE RESPONSIVE FIX
======================================= */

/* General layout */
.container-two {
  max-width: 1200px;
  margin: 16px auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  padding: 0 12px;
}

/* Grid for news sources */
.grid-root-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Sidebar widgets */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Each news source box */
.source-col {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

/* Responsive fixes for tablets and phones */
@media (max-width: 1024px) {
  .container-two {
    grid-template-columns: 3fr 2fr;
  }
}

@media (max-width: 900px) {
  /* Stack main content and sidebar */
  .container-two {
    grid-template-columns: 1fr;
  }

  /* Grid becomes single column */
  .grid-root-two {
    grid-template-columns: 1fr;
  }

  /* Sidebar moves below content */
  .sidebar {
    order: 2;
  }
  .grid-root-two {
    order: 1;
  }

  /* Improve padding on smaller screens */
  .source-col {
    padding: 10px;
  }

  /* Make images fit nicely */
  .feat-thumb img {
    width: 100%;
    height: auto;
    border-radius: 6px;
  }

  /* Headline spacing */
  .feat-title {
    font-size: 16px;
    line-height: 1.3;
  }

  /* Small items (compact list) */
  .small-item {
    flex-direction: row;
    align-items: flex-start;
  }
  .si-thumb img {
    width: 90px;
    height: 60px;
    object-fit: cover;
  }

  /* Sidebar blocks full width */
  .sidebar-box, .ad-block {
    width: 100%;
  }
}

/* Small screens (phones under 600px) */
@media (max-width: 600px) {
  .container-two {
    padding: 0 8px;
  }

  /* Reduce image size slightly */
  .si-thumb img {
    width: 80px;
    height: 55px;
  }

  .feat-title {
    font-size: 15px;
  }

  .news-thumb img {
    width: 100%;
    height: auto;
  }
}
/* =======================================
   RESET LAYOUT BUTTON
======================================= */
.reset-layout-wrapper {
  text-align: right;
  margin: 12px 16px 20px 0;
}

.reset-layout-btn {
  background: #800080;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.3s, transform 0.2s;
}

.reset-layout-btn:hover {
  background: #5e0060;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .reset-layout-wrapper {
    text-align: center;
    margin: 16px 0;
  }
}
/* =======================================
   RESET LAYOUT MODAL
======================================= */
.reset-modal {
  display: none;
  position: fixed;
  z-index: 20000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}

.reset-modal-content {
  background: #fff;
  padding: 20px 24px;
  border-radius: 10px;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: fadeInUp 0.3s ease;
}

.reset-modal-content h3 {
  color: #800080;
  margin-bottom: 10px;
}
.reset-modal-content p {
  color: #444;
  font-size: 14px;
  margin-bottom: 18px;
}

.reset-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.confirm-btn,
.cancel-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-btn {
  background: #800080;
  color: #fff;
}
.confirm-btn:hover {
  background: #5e0060;
}

.cancel-btn {
  background: #eee;
  color: #333;
}
.cancel-btn:hover {
  background: #ddd;
}

/* Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.sidebar-box h3 {
  color: #800080;
  font-size: 16px;
  margin-bottom: 8px;
  border-bottom: 2px solid #eee;
  padding-bottom: 4px;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-list li {
  margin-bottom: 6px;
}
.sidebar-list a {
  color: #1a4e9f;
  text-decoration: none;
  font-weight: 600;
}
.sidebar-list a:hover {
  color: #800080;
  text-decoration: underline;
}
.page-content {
  max-width: 800px;
  margin: 30px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.page-content h1 {
  color: #800080;
  margin-bottom: 16px;
}
.page-content form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.page-content input, .page-content textarea {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
.page-content button {
  background: #800080;
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
}
.page-content button:hover {
  background: #5e0060;
}
/* Static page layout (About, Privacy, Terms, etc.) */
.static-page {
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
  display: block;
  line-height: 1.6;
}

.static-page h1, .static-page h2 {
  color: #800080;
  margin-top: 20px;
  margin-bottom: 10px;
}

.static-page p {
  color: #333;
  margin-bottom: 10px;
  font-size: 15px;
}
/* Featured first news item styling */
.source-list-section .news-item:first-child {
  flex-direction: column;
  align-items: flex-start;
}

.source-list-section .news-item:first-child .news-thumb img {
  width: 100%;
  height: auto;
  max-height: 350px;
  border-radius: 10px;
  object-fit: cover;
}

.source-list-section .news-item:first-child .news-title {
  font-size: 20px;
  margin-top: 8px;
  font-weight: 800;
  color: #1a4e9f;
}

.source-list-section .news-item:first-child .news-desc {
  font-size: 15px;
  color: #333;
}
/* FEATURED STORY: make first news item larger */
.source-list-section .news-item:first-child {
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Bigger featured image */
.source-list-section .news-item:first-child .news-thumb img {
  width: 100%;
  height: auto;
  max-height: 420px; /* Increase or decrease for your liking */
  border-radius: 0;
  object-fit: cover;
}

/* Larger headline and spacing */
.source-list-section .news-item:first-child .news-title {
  font-size: 22px;
  font-weight: 800;
  margin: 12px 0 6px;
  color: #1a4e9f;
  line-height: 1.3;
}

/* Bigger description for featured article */
.source-list-section .news-item:first-child .news-desc {
  font-size: 16px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Optional: move Read More to right */
.source-list-section .news-item:first-child .read-more-wrapper {
  text-align: right;
}

/* Make it responsive */
@media (max-width: 768px) {
  .source-list-section .news-item:first-child .news-thumb img {
    max-height: 300px;
  }
  .source-list-section .news-item:first-child .news-title {
    font-size: 18px;
  }
}
.source-list-section .news-item:first-child .news-thumb {
  position: relative;
}

.source-list-section .news-item:first-child .news-thumb::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}
/* ==========================
   LOADING SPINNER STYLES
   ========================== */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  text-align: center;
  color: #800080;
  font-weight: 600;
  font-size: 18px;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ddd;
  border-top-color: #800080;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#newsContent {
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* --- AdSense Optimized Layout --- */
.home-main {
  max-width: 1200px;
  margin: auto;
  padding: 12px;
}

/* Featured section */
.featured-section {
  margin-bottom: 24px;
}
.section-title {
  color: #800080;
  font-size: 22px;
  font-weight: 800;
  border-left: 5px solid #800080;
  padding-left: 8px;
  margin-bottom: 12px;
}
.featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.featured-main img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}
.featured-content {
  padding: 8px 0;
}
.featured-item {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid #eee;
  padding: 6px 0;
}
.small-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}
.small-content a {
  font-weight: 600;
  color: #1a4e9f;
  text-decoration: none;
}

/* Two-column layout */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.news-item {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 10px;
}
.news-thumb img {
  width: 200px;
  height: 130px;
  border-radius: 6px;
  object-fit: cover;
}
.news-content { flex: 1; }
.news-title {
  color: #1a4e9f;
  font-weight: 700;
  text-decoration: none;
}
.read-more-wrapper { text-align: right; }
.read-more { color: #800080; font-weight: 600; text-decoration: none; }
.news-meta { font-size: 12px; color: #777; margin-top: 4px; }

/* Sidebar */
.sidebar-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.trend-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.trend-list li { margin-bottom: 6px; }
.trend-list a { color: #1a4e9f; text-decoration: none; }

/* Ad placeholders */
.ad-box {
  background: #fff;
  border: 1px dashed #800080;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  margin-bottom: 16px;
}
.ad-label {
  font-size: 12px;
  color: #777;
}
.ad-space {
  background: #f7f7f7;
  border-radius: 6px;
  padding: 30px 10px;
  font-weight: 600;
  color: #800080;
}

/* Mobile view */
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .news-item { flex-direction: column; }
  .news-thumb img { width: 100%; height: auto; }
}
/* --- Top Headlines Layout --- */
.featured-section {
  margin-bottom: 24px;
}

.section-title {
  background: #800080;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 0 0 6px 6px;
  margin-bottom: 10px;
}

/* Layout grid */
.top-headlines-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

/* Main large story */
.main-feature {
  position: relative;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}
.main-feature-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-bottom: 1px solid #ddd;
}
.main-feature-text {
  padding: 10px 14px;
}
.main-feature-text h3 {
  font-size: 18px;
  color: #1a4e9f;
  font-weight: 700;
  margin-bottom: 6px;
}
.main-feature-text h3 a {
  text-decoration: none;
  color: inherit;
}
.main-feature-text p {
  font-size: 14px;
  color: #444;
  margin-bottom: 6px;
}
.main-feature-text small {
  color: #777;
}

/* Side list */
.side-headlines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 6px;
  transition: 0.2s ease;
}
.side-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.side-thumb {
  width: 80px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
}
.side-content a {
  font-size: 13.5px;
  color: #1a4e9f;
  font-weight: 600;
  text-decoration: none;
  display: block;
  line-height: 1.3em;
}
.side-content small {
  color: #777;
  font-size: 12px;
}

/* Responsive */
@media(max-width: 900px) {
  .top-headlines-grid {
    grid-template-columns: 1fr;
  }
  .main-feature-img {
    height: auto;
  }
}
/* ---- Wrapper for Category Sections ---- */
.category-wrapper {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* Individual category box styling */
.category-section {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Section title */
.section-title {
  font-size: 18px;
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: 10px;
  border-left: 6px solid #800080;
  padding-left: 8px;
}

/* Grid inside each category (left big, right small) */
.cat-two-column {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

/* Main story */
.cat-main-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
}
.cat-main-text {
  padding: 6px 0;
}
.cat-main-text h3 a {
  font-size: 16px;
  color: #1a4e9f;
  text-decoration: none;
  font-weight: 700;
}
.cat-main-text p {
  font-size: 14px;
  color: #444;
}

/* Sidebar items */
.cat-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cat-side-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.cat-thumb {
  width: 90px;
  height: 65px;
  border-radius: 4px;
  object-fit: cover;
}
.cat-side-info a {
  color: #1a4e9f;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.cat-side-info small {
  display: block;
  font-size: 12px;
  color: #777;
}

/* Responsive */
@media (max-width: 1024px) {
  .category-wrapper {
    grid-template-columns: 1fr;
  }
}
