* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f5f5;
  color: #222;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================
   HEADER
========================= */

.site-header {
  background: #111;
  color: #fff;
  padding: 25px 0;
}

.site-header .container {
  position: relative;
}

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

.site-branding {
  min-width: 0;
}

.site-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.site-header p {
  margin: 5px 0 0;
  font-size: 16px;
  color: #ddd;
}

/* =========================
   MOBILE MENU BUTTON
========================= */

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  padding: 5px 8px;
  cursor: pointer;
}

/* =========================
   MAIN CONTENT
========================= */

.main-content {
  padding: 30px 0;
  min-height: 500px;
}

.main-content h1,
.main-content h2,
.main-content h3 {
  line-height: 1.3;
}

.main-content a {
  color: #111;
  text-decoration: none;
}

.main-content a:hover {
  text-decoration: underline;
}

/* =========================
   NAVIGATION
========================= */

.main-nav {
  background: #222;
  border-top: 1px solid #333;
  border-bottom: 1px solid #333;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}

.main-nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 14px 18px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.main-nav a:hover {
  background: #444;
  text-decoration: none;
}

/* =========================
   BREAKING NEWS
========================= */

.breaking-news {
  background: #d40000;
  color: #fff;
  padding: 10px 0;
  font-weight: 700;
}

.breaking-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.breaking-label {
  flex-shrink: 0;
}

.breaking-text {
  overflow: hidden;
}

/* =========================
   HOMEPAGE
========================= */

.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.news-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.featured-section,
.most-read,
.latest-news {
  background: #fff;
  padding: 20px;
  margin-bottom: 30px;
}

.featured-section h2,
.most-read h2,
.latest-news h2,
.main-news h2,
.sidebar h2 {
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #111;
  padding-bottom: 10px;
  font-size: 22px;
}

/* =========================
   FEATURED STORY
========================= */

.featured-story {
  margin-bottom: 25px;
}

.featured-story img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 15px;
}

.featured-story h1,
.featured-story h2 {
  margin: 0 0 10px;
}

.featured-story h1 a,
.featured-story h2 a {
  color: #111;
  text-decoration: none;
}

.featured-story h1 a:hover,
.featured-story h2 a:hover {
  color: #d40000;
}

.featured-story p {
  margin: 10px 0;
}

.featured-meta {
  color: #777;
  font-size: 14px;
  margin-bottom: 10px;
}

/* =========================
   FEATURED IMAGE
========================= */

.featured-image {
  width: 100%;
  margin-bottom: 18px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 430px;
  max-height: 550px;
  object-fit: cover;
  display: block;
}

/* =========================
   CATEGORY LABEL
========================= */

.category {
  display: inline-block;
  color: #d40000;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 5px;
}

/* =========================
   MAIN NEWS
========================= */

.main-news {
  background: #fff;
  padding: 20px;
}

.main-news h3 {
  margin: 5px 0 10px;
  font-size: 28px;
  line-height: 1.25;
}

.main-news h3:hover {
  color: #d40000;
}

.main-news p {
  margin: 0 0 10px;
}

/* =========================
   READ MORE BUTTON
========================= */

.read-more {
  display: inline-block;
  background: #111;
  color: #fff !important;
  padding: 9px 16px;
  margin-top: 10px;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.read-more:hover {
  background: #d40000;
  color: #fff !important;
}

/* =========================
   SIDEBAR / MOST READ
========================= */

.sidebar {
  background: #fff;
  padding: 20px;
}

.sidebar-story {
  padding: 14px 0;
  border-bottom: 1px solid #ddd;
}

.sidebar-story:last-child {
  border-bottom: none;
}

.sidebar-story h3 {
  margin: 5px 0;
  font-size: 17px;
  line-height: 1.35;
}

.sidebar-story h3 a {
  color: #222;
  text-decoration: none;
}

.sidebar-story h3 a:hover {
  color: #d40000;
}

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

.most-read li {
  padding: 12px 0;
  border-bottom: 1px solid #ddd;
  list-style: none;
}

.most-read li:last-child {
  border-bottom: none;
}

.most-read a {
  font-weight: 600;
  color: #222;
}

.most-read a:hover {
  color: #d40000;
  text-decoration: none;
}

.article-card-date {
  color: #777;
  font-size: 13px;
  margin: 5px 0 0;
}

/* =========================
   LATEST NEWS
========================= */

.latest-news {
  margin-top: 30px;
}

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

.news-card {
  background: #fff;
  border: 1px solid #ddd;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.news-card-image {
  width: 100%;
  overflow: hidden;
}

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

.news-card h3 {
  margin: 4px 0 10px;
  font-size: 19px;
  line-height: 1.35;
}

.news-card h3 a {
  color: #111;
  text-decoration: none;
}

.news-card h3 a:hover {
  color: #d40000;
}

.news-card p {
  margin: 0 0 10px;
  color: #555;
}

.news-meta {
  font-size: 13px;
  color: #777;
  margin-bottom: 10px;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
}

.site-footer h2 {
  margin-top: 0;
}

.site-footer p {
  margin: 5px 0;
  color: #ccc;
}

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

/* =========================
   ARTICLE PAGE
========================= */

.article-page {
  background: #fff;
  padding: 30px;
  margin-top: 30px;
}

.article-page h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 38px;
  line-height: 1.2;
}

.article-meta {
  color: #777;
  font-size: 14px;
  margin-bottom: 20px;
}

.article-featured-image {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  display: block;
  margin-bottom: 25px;
}

.article-image-caption {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    text-align: left;
}

.article-content {
  font-size: 18px;
  line-height: 1.8;
}

.article-content p {
  margin: 0 0 20px;
}

/* =========================
   BREADCRUMBS
========================= */

.breadcrumbs {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: #555;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #d40000;
  text-decoration: underline;
}

/* =========================
   RELATED ARTICLES
========================= */

.related-articles {
  margin-top: 40px;
  padding-top: 25px;
  border-top: 2px solid #ddd;
}

.related-articles h2 {
  margin-top: 0;
}

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

.related-card {
  border: 1px solid #ddd;
  background: #fff;
  overflow: hidden;
}

.related-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.related-card-content {
  padding: 15px;
}

.related-card h3 {
  margin: 0;
  font-size: 18px;
}

.related-card h3 a {
  color: #111;
  text-decoration: none;
}

.related-card h3 a:hover {
  color: #d40000;
}

/* =========================
   SEARCH
========================= */

.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.search-form input[type="text"] {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.search-form button {
  background: #111;
  color: #fff;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 16px;
}

.search-form button:hover {
  background: #d40000;
}

.search-result {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
}

.search-result img {
  width: 220px;
  height: 140px;
  object-fit: cover;
  float: left;
  margin-right: 20px;
}

.search-result h2 {
  margin-top: 0;
}

.search-result::after {
  content: "";
  display: table;
  clear: both;
}

/* =========================
   PAGINATION
========================= */

.pagination {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 13px;
  border: 1px solid #ccc;
  background: #fff;
  text-decoration: none;
  color: #222;
}

.pagination a:hover {
  background: #111;
  color: #fff;
}

.pagination .current {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* =========================
   CATEGORY PAGE
========================= */

.category-header {
  background: #fff;
  padding: 20px;
  margin-bottom: 25px;
  border-bottom: 2px solid #111;
}

.category-header h1 {
  margin: 0;
}

.category-article {
  background: #fff;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
}

.category-article img {
  width: 280px;
  height: 180px;
  object-fit: cover;
  float: left;
  margin-right: 20px;
}

.category-article::after {
  content: "";
  display: table;
  clear: both;
}

/* =========================
   ADMIN FORMS
========================= */

form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

form input,
form select,
form textarea {
  max-width: 100%;
  font-family: Arial, Helvetica, sans-serif;
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="url"],
form select,
form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  margin-bottom: 15px;
}

form textarea {
  min-height: 180px;
  resize: vertical;
}

form button {
  background: #111;
  color: #fff;
  border: none;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 15px;
}

form button:hover {
  background: #333;
}

/* =========================
   TABLES
========================= */

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

table th,
table td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: left;
}

table th {
  background: #111;
  color: #fff;
}

/* =========================
   404 PAGE
========================= */

.error-page {
  background: #fff;
  text-align: center;
  padding: 60px 20px;
  margin-top: 30px;
}

.error-page h1 {
  font-size: 60px;
  margin: 0;
  line-height: 1;
}

.error-page h2 {
  margin: 15px 0;
}

/* =========================
   MOBILE RESPONSIVE DESIGN
========================= */

@media (max-width: 768px) {

  .container {
    width: 94%;
  }

  /* HEADER */

  .site-header {
    padding: 18px 0;
  }

  .site-header h1 {
    font-size: 24px;
  }

  .site-header p {
    font-size: 14px;
  }

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

  .menu-toggle {
    display: block;
  }

  /* MOBILE NAVIGATION */

  body:has(.menu-toggle) .main-nav {
    display: none;
  }

  body:has(.menu-toggle) .main-nav.menu-open {
    display: block;
  }

  body:has(.menu-toggle) .main-nav ul {
    display: block;
    width: 100%;
  }

  body:has(.menu-toggle) .main-nav li {
    width: 100%;
    border-bottom: 1px solid #444;
  }

  body:has(.menu-toggle) .main-nav li:last-child {
    border-bottom: none;
  }

  body:has(.menu-toggle) .main-nav a {
    padding: 13px 15px;
    font-size: 14px;
  }

  /* BREAKING NEWS */

  .breaking-container {
    display: block;
  }

  .breaking-label {
    display: block;
    margin-bottom: 4px;
  }

  .breaking-text {
    font-size: 13px;
  }

  /* HOMEPAGE */

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

  .news-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
  }

  .main-news,
  .sidebar {
    padding: 15px;
  }

  .main-news h2,
  .sidebar h2,
  .latest-news h2 {
    font-size: 20px;
  }

  .main-news h3 {
    font-size: 24px;
  }

  .featured-section,
  .most-read,
  .latest-news {
    padding: 15px;
  }

  .featured-image img {
    height: auto;
    max-height: 350px;
  }

  /* NEWS GRID */

  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .news-card img {
    height: auto;
    max-height: 300px;
  }

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

  /* RELATED ARTICLES */

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

  /* ARTICLE */

  .article-page {
    padding: 20px 15px;
    margin-top: 20px;
  }

  .article-page h1 {
    font-size: 28px;
  }

  .article-content {
    font-size: 17px;
  }

  /* SEARCH */

  .search-form {
    display: block;
  }

  .search-form input[type="text"] {
    width: 100%;
    margin-bottom: 10px;
  }

  .search-form button {
    width: 100%;
  }

  .search-result img {
    width: 100%;
    height: auto;
    float: none;
    margin: 0 0 15px;
  }

  /* CATEGORY */

  .category-article img {
    width: 100%;
    height: auto;
    float: none;
    margin: 0 0 15px;
  }

  /* ADMIN */

  .main-content form textarea#content {
    min-height: 250px;
  }

  /* TABLES */

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

}
