/* styles.css */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Montserrat:wght@700&display=swap');

/* Base Styles */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #1a202c; /* Dark background */
  color: #ffffff; /* White text */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* Thumbnail Image for Home Page and Tutorials */
.thumbnail, .tutorial-image {
  width: 100%;
  max-height: 300px; /* Adjust this value to change thumbnail size */
  object-fit: cover;
  border-radius: 8px 8px 0 0; /* Match card border radius */
}

/* Featured News Image */
.featured-news img {
  max-height: 400px; /* Larger height for featured news */
  object-fit: cover;
}

/* Header Styles */
header {
  background-color: #2d3748; /* Darker background */
  padding: 10px 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #00FFFF; /* Neon blue */
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.nav-link {
  position: relative;
  padding: 5px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background-color: #00FFFF;
  transition: width 0.3s ease-in-out;
}

.nav-link:hover::after {
  width: 100%;
}

/* Search Bar */
.search-bar {
  background-color: #4a5568;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  color: #ffffff;
}

.search-bar::placeholder {
  color: #a0aec0;
}

/* Main Content Styles */
main {
  flex-grow: 1;
}

.main-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 15px;
}

.section-title {
  font-size: 32px;
  margin-bottom: 20px;
}

section {
  margin-bottom: 40px;
}

.card {
  background-color: #2d3748;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
}

.card-content {
  padding: 15px;
  flex-grow: 1;
}

.card-title {
  font-size: 24px;
  margin-bottom: 10px;
  color: #00FFFF;
}

.article-date {
  font-size: 14px;
  color: #a0aec0;
  margin-bottom: 10px;
}

.card-text {
  color: #a0aec0;
  margin-bottom: 15px;
}

.button {
  background-color: #00FFFF;
  color: #1a202c;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
  text-align: center;
}

.button:hover {
  background-color: #00e5e5;
  transform: translateY(-3px);
}

/* Grid Styles */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-list .card {
  width: 100%;
}

/* Featured News Styles */
.featured-news {
  display: flex;
  flex-direction: column;
}

.featured-news .card {
  width: 100%;
}

.featured-news .card-content {
  padding: 20px;
}

.featured-news .card-title {
  font-size: 28px;
  margin-bottom: 15px;
}

.featured-news .card-text {
  font-size: 16px;
  margin-bottom: 20px;
}

/* Load More Button Container */
.load-more-container {
  text-align: center;
  margin: 20px 0;
}

/* Error Message */
.error-message {
  color: red;
  text-align: center;
  margin-top: 20px;
}

/* Footer Styles */
footer {
  background-color: #2d3748;
  padding: 20px 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  text-align: center;
}

.footer-text {
  color: #a0aec0;
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.social-icons a {
  color: #a0aec0;
  font-size: 20px;
  transition: color 0.3s ease-in-out;
}

.social-icons a:hover {
  color: #00FFFF;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-container, .main-container, .footer-container {
    padding: 0 10px;
  }

  .nav-links {
    display: none;
  }
}


/* Hover effect for cards */
.card:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease-in-out;
}
