:root {
  --primary: #3a86ff;
  --primary-light: #4cc9f0;
  --secondary: #8338ec;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
  background-color: #f8f9fa;
  color: var(--dark);
  line-height: 1.6;
}

/* Header Styles */
header {
  background-color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  font-size: 25px;
  font-weight: 700;
  color: #5ea8df;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo img {
  width: 75px;
}

.logo span {
  font-family: "Spectral", serif;
}

.logo i {
  margin-right: 10px;
  color: var(--secondary);
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.nav-links a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  font-size: 15px;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 5rem 5%;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  font-family: "Spectral", serif;
}

h1 {
  font-family: "Spectral", serif;
  line-height: 1.2em;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.search-bar {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 1rem;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  padding-left: 20px;
  box-shadow: var(--shadow);
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  position: absolute;
  right: 5px;
  top: 5px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.7rem 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  background: var(--secondary);
}

/* Main Content */
.container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

/* Blog Posts */
#posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.post-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

#blog-article {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  padding: 24px;
}

#blog-article img {
  width: 100%;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-title {
  font-size: 1.6rem;
  margin: 0.7rem 0 0.5rem;
  color: var(--dark);
  font-family: "Spectral", serif;
  line-height: 34px;
}

.post-excerpt {
  color: var(--gray);
  margin-bottom: 1.5rem;
}

.read-more {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.read-more:hover {
  color: var(--secondary);
}

.read-more i {
  margin-left: 5px;
  transition: var(--transition);
}

.read-more:hover i {
  transform: translateX(3px);
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.widget-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  /* padding-bottom: 0.5rem; */
  border-bottom: 2px solid var(--light-gray);
  color: var(--dark);
  font-family: "Spectral", serif;
}

.popular-posts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popular-post {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--light-gray);
  text-decoration: none;
}

.popular-post:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-post img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.popular-post-title {
  font-size: 0.9rem;
  color: var(--dark);
  transition: var(--transition);
}

.popular-post-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.categories-list {
  list-style: none;
}

.categories-list li {
  margin-bottom: 0.8rem;
}

.categories-list a {
  color: var(--gray);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
}

.categories-list a:hover {
  color: var(--primary);
}

.categories-list span {
  background: var(--light-gray);
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  font-size: 0.8rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--light-gray);
  color: var(--gray);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  transition: var(--transition);
  text-decoration: none;
}

.tag:hover {
  background: var(--primary);
  color: white;
}

/* Newsletter */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-form input {
  padding: 0.8rem;
  border: 1px solid var(--light-gray);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.newsletter-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background: var(--secondary);
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 4rem 5% 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-col h3 {
  font-size: 1.2rem;
  margin-bottom: 1.3rem;
  position: relative;
  font-family: "Spectral", serif;
}

.footer-col h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

.footer-col p {
  margin-bottom: 1rem;
  color: #adb5bd;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #adb5bd;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.copyright {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #adb5bd;
  font-size: 0.9rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  gap: 0;
}

.pagination a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: var(--border-radius);
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.pagination a:hover,
.pagination a.active {
  background: var(--primary);
  color: white;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 5%;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    margin-top: 26px;
  }

  .nav-links a {
    font-size: 18px;
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 3rem 5%;
  }

  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* scroll to top */
#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  /* padding: 10px 15px; */
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* Hidden by default */
  transition: opacity 0.3s ease-in-out;
}

/* From Uiverse.io by mrpumps31232 */
.loading-wave {
  width: 300px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.loading-bar {
  width: 20px;
  height: 10px;
  margin: 0 5px;
  background-color: #3498db;
  border-radius: 5px;
  animation: loading-wave-animation 1s ease-in-out infinite;
}

.loading-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.loading-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.loading-bar:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes loading-wave-animation {
  0% {
    height: 10px;
  }

  50% {
    height: 50px;
  }

  100% {
    height: 10px;
  }
}
