/* Basic Styling */
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
  line-height: 1.7;
}

header {
  background-color: #1e1e1e;
  color: #fff;
  padding: 15px 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #333;
  color: #fff;
}

header.dark-mode {
  background-color: #000;
}

section.dark-mode {
  background-color: #444;
  color: #fff;
}

/* Toggle Button */
#dark-mode-toggle {
  background-color: #ff6347;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
}

#dark-mode-toggle:hover {
  background-color: #e55337;
}

/* Search Form */
#search-form {
  display: inline-block;
  position: relative;
}
#search-input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.search-btn {
  background-color: #ff6347;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.search-btn:hover {
  background-color: #e55337;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

nav li {
  display: inline-block;
  margin: 0 30px;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  font-size: 1.1em;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ff6347; /* Tomato color for hover effect */
}

main {
  padding: 40px;
}

section {
  background-color: #fff;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

h1,
h2,
h3 {
  text-align: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 3.5em;
  font-weight: 800;
  color: #333;
}

h2 {
  font-size: 3em;
  font-weight: bold;
  color: #444;
}

h3 {
  font-size: 2em;
  font-weight: 600;
  color: #555;
}

/* Subscribe Section */
.subscribe {
  text-align: center;
  margin-top: 30px;
}

.subscribe-container {
  display: inline-block;
  padding: 30px;
  border-radius: 10px;
  background-color: #f0f0f0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.subscribe-btn {
  background-color: #ff6347;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.subscribe-btn:hover {
  background-color: #e55337;
  transform: scale(1.05); /* Slight grow on hover */
}
.subscribe-btn i {
  margin-right: 8px;
}

/* News Section */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.news-item {
  text-align: left;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.news-item:hover {
  transform: translateY(-10px);
}

.news-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 15px;
  border-radius: 8px;
}

.read-more {
  color: #ff6347;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: color 0.3s ease, transform 0.3s ease;
}

.read-more:hover {
  color: #e55337;
  transform: scale(1.05); /* Slight grow on hover */
}

/* Comment Section */
.interaction form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 30px;
}

.interaction input,
.interaction textarea {
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
}

.submit-btn {
  background-color: #ff6347;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.submit-btn:hover {
  background-color: #e55337;
  transform: scale(1.05); /* Slight grow on hover */
}

/* Follow Us Section */
.follow-us {
  text-align: center;
  margin-top: 30px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}

.social-icons img {
  width: 35px;
  height: 35px;
  transition: transform 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.1);
}

/* Footer */
footer {
  background-color: #1e1e1e;
  color: #fff;
  text-align: center;
  padding: 15px 0;
  font-weight: bold;
  position: relative;
}

/* Media Queries for Mobile Responsive Design */

@media screen and (max-width: 480px) {
  h1 {
    font-size: 2em;
  }
  h2 {
    font-size: 1.8em;
  }
  h3 {
    font-size: 1.5em;
  }
  .subscribe-btn {
    padding: 10px 20px;
    font-size: 1em;
  }
  .submit-btn {
    padding: 10px 20px;
    font-size: 1em;
  }
}
@media screen and (max-width: 768px) {
  /* Navigation */
  nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
  }

  nav li {
    margin-bottom: 15px;
  }

  nav a {
    font-size: 1.2em;
    padding: 10px;
  }

  /* Main Content */
  main {
    padding: 10px;
  }

  section {
    padding: 15px;
    margin-bottom: 20px;
  }

  /* Headings */
  h1 {
    font-size: 2.5em; /* Reduce size for mobile */
  }

  h2 {
    font-size: 2em;
  }

  h3 {
    font-size: 1.5em;
  }

  /* News Section */
  .news-grid {
    grid-template-columns: 1fr; /* Single column for news on mobile */
    gap: 15px;
  }

  .news-item img {
    height: 150px; /* Adjust image height */
  }

  /* Subscribe Section */
  .subscribe-container {
    padding: 15px;
    width: 90%;
    margin: 0 auto;
  }

  .subscribe-btn {
    padding: 10px;
    font-size: 1em;
  }

  /* Comment Section */
  .interaction form {
    gap: 8px;
  }

  .interaction input,
  .interaction textarea {
    padding: 10px;
    font-size: 1em;
  }

  .submit-btn {
    padding: 10px;
    font-size: 1em;
  }

  /* Follow Us Section */
  .social-icons {
    gap: 10px;
  }

  .social-icons img {
    width: 30px;
    height: 30px;
  }

  /* Footer */
  footer {
    padding: 20px;
    font-size: 1em;
  }
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #333;
  color: #fff; /* Change text color to white */
}

header.dark-mode {
  background-color: #000;
  color: #fff; /* Ensure header text is white */
}

section.dark-mode {
  background-color: #444;
  color: #fff; /* Ensure section text is white */
}

footer.dark-mode {
  background-color: #000;
  color: #fff; /* Ensure footer text is white */
}

/* Override for other text elements if necessary */
h1,
h2,
h3,
p,
a {
  color: inherit; /* Ensure they inherit the color from the parent (white in dark mode) */
}

/* Specific override for links in dark mode */
a.dark-mode {
  color: #ff6347; /* Keep links in a different color, or use white */
}

@media screen and (max-width: 480px) {
  nav li {
    margin-bottom: 10px;
  }
  .news-item img {
    height: 150px; /* Slightly smaller for mobile */
  }
}
