/* General reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
  
/* Basic styling */
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #ffffff;
  padding: 20px;
}
  
.container {
  max-width: 800px;
  margin: auto;
}
  
/* Content adjustments for fixed header */
main {
  margin-top: 70px;
}

  
/* Section titles */
h2 {
  font-size: 1.6rem;
  margin-top: 60px;
  color: #333;
  /* border-bottom: 2px solid #ddd; */
  padding-bottom: 10px;
  text-align: center;
}

h4 {
  font-size: 1.2rem;
  margin-top: 60px;
  color: #333;
  border-bottom: 2px solid #ddd;
  padding-bottom: 5px;
}
  
.blog-posts {
  margin: 20px 0 70px 0;
}

/* ============BLOG POSTS GRID=========== */
/* ======================================= */

/* Blog Posts Grid Container */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0 40px 0;
}

/* Blog Post Card */
.blog-post-card {
  background-color: #ffffff;
  border: 2px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.blog-post-card:hover {
  border-color: #333;
  transform: translateY(-2px);
}

.blog-post-image {
  width: 100%;
  height: 130px;
  overflow: hidden;
  background-color: #f5f5f5;
}

.blog-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post-content {
  padding: 12px;
}

.blog-post-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: #666;
}

.blog-date,
.blog-read-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-icon {
  width: 14px;
  height: 14px;
  color: #666;
}

.blog-post-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: #333;
  margin: 0;
}

.blog-post-title a {
  text-decoration: none;
  color: inherit;
  transition: text-decoration 0.2s ease;
}

.blog-post-title a:hover {
  text-decoration: underline;
}

/* Dark Theme Adjustments for Blog Cards */
body.dark-theme .blog-post-card {
  background-color: #1a1a1a;
  border-color: #444;
}

body.dark-theme .blog-post-card:hover {
  border-color: #ddd;
}

body.dark-theme .blog-post-image {
  background-color: #2a2a2a;
}

body.dark-theme .blog-post-title {
  color: #e0e0e0;
}

body.dark-theme .blog-post-title a {
  color: #e0e0e0;
}

body.dark-theme .blog-post-meta {
  color: #999;
}

body.dark-theme .blog-icon {
  color: #999;
}

/* ======================================= */
/* =======END OF BLOG POSTS GRID========= */
  
/* Footer */
footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.8rem;
  color: #999;
  border-top: 2px solid #ddd;
  padding-top: 5px;
}

.nav-button {
  text-decoration: none;
  color: #999;
  font-weight: bold;
  font-size: 0.8rem;
  transition: font-weight 0.3s, color 0.3s;
}

.nav-button:hover {
  font-weight: bold;
  color: #333;
}

body.dark-theme .nav-button {
  color: #999;
  font-weight: bold;
}

body.dark-theme .nav-button:hover {
  color: #ddd;
  font-weight: bold;
}

/* Dark theme */
/* ============== */

/* Dark theme */
body.dark-theme {
  background-color: #121212;
  color: #e0e0e0;
}
  
/* Dark theme - Section headers */
body.dark-theme h2 {
  color: #e0e0e0;
}

body.dark-theme h4 {
  color: #e0e0e0;
  border-bottom: 2px solid #666;
}
  
/* Dark theme - Footer border */
body.dark-theme footer {
  border-top: 2px solid #666;
}
/* ============== */

/* TO REMOVE THE BLUE BG EFFECT ON PHONES */
/* ===================================== */
/* Remove focus and active outline or background effect */
button, a, div, svg {
  -webkit-tap-highlight-color: transparent; /* Removes highlight color on touch */
}

button:focus, a:focus, div:focus, svg:focus {
  outline: none; /* Removes outline for focus */
}

button:active, a:active, div:active, svg:active {
  background-color: transparent; /* Ensures no background color on active */
  outline: none; /* Removes outline for active state */
}
/* ===================================== */


/* Responsive Layout for Mobile Screens */
@media (max-width: 768px) {
  /* Section titles (h2) */
  h2 {
    font-size: 1.4rem; /* Slightly smaller for mobile */
    font-weight: 600;
    margin-top: 60px; /* Reduced spacing */
    padding-bottom: 8px;
    line-height: 1.3;
    text-align: center;
  }

  /* Section titles (h4) */
  h4 {
    font-size: 1.1rem; /* Adjusted for mobile */
    font-weight: 700;
    margin-top: 40px;
    padding-bottom: 4px;
    line-height: 1.3;
  }

  /* Navigation buttons */
  .nav-button {
    font-size: 0.75rem; /* Slightly smaller for mobile */
    font-weight: 700; /* Bold as specified */
    line-height: 1.4;
  }

  /* Dark theme adjustments for mobile */
  body.dark-theme h2, body.dark-theme h4 {
    color: #e0e0e0;
  }

  body.dark-theme .nav-button {
    color: #999;
    font-weight: 700;
  }

  body.dark-theme .nav-button:hover {
    color: #ddd;
    font-weight: 700;
  }

  /* Adjust container padding for mobile */
  .container {
    padding: 0 15px; /* Tighter padding */
  }

  /* Blog section adjustments */
  .blog-posts {
    margin: 15px 0 50px 0; /* Reduced margin */
  }

  /* Footer */
  footer {
    font-size: 0.75rem; /* Slightly smaller */
    margin-top: 30px;
    padding-top: 4px;
  }

  /* Adjust main margin for fixed header */
  main {
    margin-top: 60px; /* Slightly reduced for mobile */
  }

  /* Blog Posts Grid - Mobile Responsive */
  .blog-posts-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 16px;
    margin: 15px 0 30px 0;
  }

  .blog-post-card {
    max-width: 100%; /* Full width on mobile */
  }

  .blog-post-image {
    height: 140px; /* Reduced height for mobile */
  }

  .blog-post-content {
    padding: 12px;
  }

  .blog-post-title {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .blog-post-meta {
    font-size: 0.7rem;
    gap: 10px;
    margin-bottom: 7px;
  }

  .blog-icon {
    width: 12px;
    height: 12px;
  }
}