:root {
  --primary-color: #0b2239; /* Dark Blue */
  --secondary-color: #1a4b80; /* Lighter Blue */
  --accent-color: #e63946; /* Red for breaking news / highlights */
  --bg-color: #f4f7f6; /* Very light grey for background */
  --text-dark: #333333;
  --text-light: #ffffff;
  --border-color: #e0e0e0;
  --hover-color: #f0f0f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Roboto', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

/* Header & Navigation */
header {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
}

.logo-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 5%;
}

.logo {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-light);
  letter-spacing: -1px;
}

.logo span {
  color: var(--accent-color);
}

.search-box {
  display: flex;
}

.search-box input {
  padding: 10px 15px;
  border: none;
  outline: none;
  border-radius: 4px 0 0 4px;
  width: 250px;
}

.search-box button {
  padding: 10px 15px;
  background-color: var(--accent-color);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 0 4px 4px 0;
  font-weight: bold;
  transition: background 0.3s;
}

.search-box button:hover {
  background-color: #c92a37;
}

.user-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

.btn-login, .btn-write {
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-login {
  background-color: transparent;
  color: white;
  border: 1px solid white;
}

.btn-login:hover {
  background-color: rgba(255,255,255,0.1);
}

.btn-write {
  background-color: #2a9d8f;
  color: white;
  border: 1px solid #2a9d8f;
}

.btn-write:hover {
  background-color: #21867a;
}

/* Forms (Login & Write Article) */
.form-container {
  max-width: 600px;
  margin: 50px auto;
  background: white;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-container h2 {
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  font-family: inherit;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--secondary-color);
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background-color: var(--secondary-color);
}

.form-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.form-footer a {
  color: var(--accent-color);
  font-weight: bold;
}

/* Editor Specific */
.editor-toolbar {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
}

.editor-toolbar button {
  background: white;
  border: 1px solid #ddd;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 3px;
}

.editor-toolbar button:hover {
  background: #eee;
}

.editor-textarea {
  border-radius: 0 0 4px 4px !important;
  min-height: 300px;
  resize: vertical;
}

nav {
  background-color: var(--secondary-color);
  padding: 0 5%;
}

.nav-links {
  display: flex;
}

.nav-links li a {
  display: block;
  padding: 15px 20px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.nav-links li a:hover, .nav-links li a.active {
  background-color: var(--primary-color);
  color: var(--text-light);
}

/* Breaking News Ticker */
.breaking-news {
  display: flex;
  align-items: center;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  height: 40px;
}

.breaking-label {
  background-color: var(--accent-color);
  color: white;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.8rem;
  z-index: 2;
}

.breaking-ticker {
  flex-grow: 1;
  padding-left: 15px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: inline-block;
  animation: ticker 25s linear infinite;
  font-size: 0.9rem;
  font-weight: 500;
}

.ticker-content a {
  margin-right: 50px;
}

.ticker-content a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

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

/* Main Content Layout */
.container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 30px;
}

.full-width {
  grid-column: 1 / -1;
}

/* Hero Section */
.hero-news {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.hero-main {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 450px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-main:hover img {
  transform: scale(1.05);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(11,34,57,0.95), transparent);
  color: white;
}

.category-tag {
  background-color: var(--accent-color);
  color: white;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: inline-block;
}

.category-tag.blue { background-color: var(--secondary-color); }
.category-tag.green { background-color: #2a9d8f; }

.hero-content h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  height: 215px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

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

.side-card:hover img {
  transform: scale(1.05);
}

.side-card .hero-content {
  padding: 15px;
  background: linear-gradient(to top, rgba(11,34,57,0.9), transparent);
}

.side-card h3 {
  font-size: 1.1rem;
  line-height: 1.3;
}

/* Section Titles */
.section-title {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--accent-color);
}

/* Latest News List */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.news-item {
  display: flex;
  gap: 20px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.news-item img {
  width: 250px;
  height: 160px;
  object-fit: cover;
}

.news-item-content {
  padding: 15px 20px 15px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-meta {
  font-size: 0.8rem;
  color: #777;
  margin: 8px 0;
}

.news-item h2 {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-item p {
  color: #555;
  font-size: 0.95rem;
}

/* Sidebar */
.sidebar-widget {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.trending-list li {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.trending-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--border-color);
  line-height: 1;
}

.trending-content h4 {
  font-size: 1rem;
  color: var(--primary-color);
  margin-bottom: 5px;
  transition: color 0.3s;
}

.trending-list li:hover .trending-content h4 {
  color: var(--accent-color);
}

/* Article Detail Page */
.article-header {
  margin-bottom: 25px;
}

.article-header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin: 15px 0;
  line-height: 1.2;
}

.article-author-date {
  display: flex;
  gap: 15px;
  font-size: 0.9rem;
  color: #666;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.article-author-date span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 25px;
}

.article-body {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.8;
}

.article-body p {
  margin-bottom: 20px;
}

.article-body h2 {
  color: var(--primary-color);
  margin: 30px 0 15px;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.category-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
}

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

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

.category-card h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin: 10px 0;
  line-height: 1.4;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 50px 5% 20px;
  margin-top: 50px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.footer-about p {
  margin-top: 15px;
  color: #ccc;
  font-size: 0.9rem;
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: white;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: #ccc;
  transition: color 0.3s;
}

.footer-links ul li a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #999;
  font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .container {
    grid-template-columns: 1fr;
  }
  .hero-news {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .logo-section {
    flex-direction: column;
    gap: 15px;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .news-item {
    flex-direction: column;
  }
  .news-item img {
    width: 100%;
    height: 200px;
  }
  .news-item-content {
    padding: 15px;
  }
}
