/* General styles */
body {
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode {
  background: #1c2526;
  color: #e0e0e0;
}

/* Header */
header {
  background: linear-gradient(90deg, #003087, #005566);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

header h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
}

nav {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  background: #0288d1;
  border-radius: 8px;
}

nav a:hover {
  background: #01579b;
}

nav button {
  padding: 0.6rem 1.2rem;
  background: #0288d1;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
}

nav button:hover {
  background: #01579b;
}

nav select {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  background: white;
  cursor: pointer;
}

body.dark-mode nav select {
  background: #2c3e50;
  color: #e0e0e0;
  border-color: #546e7a;
}

nav input {
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 250px;
}

body.dark-mode nav input {
  background: #2c3e50;
  color: #e0e0e0;
  border-color: #546e7a;
}

#dark-mode-toggle {
  background: #ffca28;
  color: #333;
  font-weight: bold;
}

#dark-mode-toggle:hover {
  background: #ffb300;
}

/* Sections */
section {
  padding: 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #003087;
}

body.dark-mode h2 {
  color: #4fc3f7;
}

/* Featured News */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

#featured article {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s, box-shadow 0.3s;
}

body.dark-mode #featured article {
  background: #2c3e50;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

#featured article:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

#featured article img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

#featured article h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: #003087;
}

body.dark-mode #featured article h4 {
  color: #4fc3f7;
}

/* Articles (Latest and Local News) */
article {
  background: white;
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

body.dark-mode article {
  background: #2c3e50;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

article:hover {
  transform: translateY(-5px);
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1rem;
}

article h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
  color: #003087;
}

body.dark-mode article h3 {
  color: #4fc3f7;
}

article p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

article small {
  color: #555;
}

body.dark-mode article small {
  color: #b0bec5;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 12px;
  max-width: 800px;
  position: relative;
}

body.dark-mode .modal-content {
  background: #2c3e50;
}

.modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.modal-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #003087;
}

body.dark-mode .modal-content h3 {
  color: #4fc3f7;
}

.modal-content p {
  line-height: 1.6;
  margin: 1rem 0;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

body.dark-mode .close-btn {
  color: #e0e0e0;
}

/* Admin form */
#admin-form {
  background: white;
  border: 1px solid #e0e0e0;
  padding: 2rem;
  border-radius: 12px;
}

body.dark-mode #admin-form {
  background: #2c3e50;
  border-color: #546e7a;
}

form input, form textarea {
  display: block;
  width: 100%;
  margin: 0.75rem 0;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

body.dark-mode form input, body.dark-mode form textarea {
  background: #2c3e50;
  color: #e0e0e0;
  border-color: #546e7a;
}

form button {
  background: #0288d1;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}

form button:hover {
  background: #01579b;
}

/* Responsive design */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 0.75rem;
  }
  nav input, nav select {
    width: 100%;
    margin-top: 0.75rem;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  #featured article {
    width: 100%;
    margin: 1rem 0;
  }
  .modal-content {
    margin: 10% 1rem;
  }
}