/* Reset and basic styling */
body {
  font-family: "Georgia", "Times New Roman", Times, serif;
  margin: 0;
  padding: 0;
  font-size: 1.1rem;
  color: #333;
  line-height: 1.6;
  background-color: #f5f5f5;
}

h1, h2, h3 {
  font-family: "Merriweather", serif;
}

h1 { font-size: 2.2rem; line-height: 2.6rem; }
h2 { font-size: 1.7rem; line-height: 2.2rem; }
h3 { font-size: 1.55rem; line-height: 2.0rem; }

a {
  color: #3498db;
  text-decoration: none;
}

a:hover, a:active {
  color: #2980b9;
  text-decoration: underline;
}

main, .container {
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
  padding: 30px 0;
}

header {
  font-family: "Helvetica Neue", helvetica, Arial, sans-serif;
  background: #4a90e2;
  color: #fff;
  overflow: hidden;
  min-height: 65px;
}

header a {
  color: #fff;
  text-decoration: none;
}

header nav {
  padding-top: 5px;
}

header nav a {
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: 12px 18px;
  float: left;
  margin: 5px;
}

header nav a.active {
  background: #333;
  border-radius: 20px;
}

header ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

header .identity {
  float: left;
  margin-left: 30px; /* Restore left margin */
  margin-top: 20px;
  margin-right: 10px;
  margin-bottom: 20px;
  width: auto;
  max-width: 350px;
}

.logo {
  font-weight: 600;
  font-size: 1.5rem;
}

.alert, .alert-info {
  border-radius: 5px;
  border: 1px solid #3498db;
  background: #eaf4fb;
  padding: 15px;
}

.image {
  max-width: 40%;
  width: 250px;
  margin-left: 10px;
  margin-bottom: 10px;
  float: right;
  border-radius: 15px;
}

.site-desc {
  clear: both;
  font-size: 1rem;
  margin-top: 10px;
}

.searchform {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.sortby, .total, .total2 {
  margin: 20px 0;
  text-align: right;
}

.btn, .btn-default {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  margin-right: 4px;
  margin-bottom: 4px;
  border-radius: 5px;
  font-size: 1rem;
}

.btn {
  background: #3498db;
  color: #fff;
}

.btn-default {
  background: #ecf0f1;
  color: #333;
  border: 1px solid #bdc3c7;
}

footer {
  text-align: center;
  background: #fff;
  padding: 25px;
  margin-top: 60px;
  border-top: 1px solid #e5e5e5;
}

.blog-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    gap: 1rem;
}

.blog-navigation a {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.blog-navigation a:hover {
    background-color: #e5e5e5;
}

.blog-navigation .prev-blog {
    text-align: left;
}

.blog-navigation .next-blog {
    text-align: right;
}

.blog-article a {
  color: #333;
  text-decoration: none;
}
.home-blog-image {
  width: 80px;
  height: 80px;
}
@media only screen and (max-width: 992px) {
  h1 { font-size: 1.4rem; line-height: 1.9rem; }
  h2 { font-size: 1.2rem; line-height: 1.7rem; }
  h3 { font-size: 1.1rem; line-height: 1.4rem; }
  h1, h2, h3, h4 { overflow-wrap: break-word; word-wrap: break-word; }

  header .identity {
    width: auto;
    text-align: left; /* Ensure site title aligns left */
    margin: 0;
    margin-left: 30px; /* Restore left margin on mobile */
    padding-top: 14px;
  }
  
  main, .container {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .site-desc {
    display: none;
  }

  header nav {
    width: 100%;
    text-align: left;
    float: none;
    clear: both;
  }

  /* Hide menu initially */
  #menu {
    display: none;
    padding-left: 0;
    width: 100%;
  }

  #hideshowmenu {
    display: block;
    cursor: pointer;
    background: none;
    color: white;
    padding: 12px;
    margin: 0 5px 0 0;
    font-size: 1.5rem;
    position: absolute;
    top: 0;
    right: 1px;
    text-decoration: none
  }

  #hideshowmenu .text { display: none; }

  /* Show menu when active class is added */
  #menu.active {
    display: block;
  }

  #menu li {
    display: block;
    width: 100%;
    text-align: left;
  }

  #menu li a {
    display: block;
    width: 100%;
    text-align: left;
    padding-left: 0;
    padding: 10px;
    border-top: 1px solid #fff;
    border-radius: 0;
  }

  header nav a.active {
    border-radius: 0;
  }
}

@media only screen and (min-width: 993px) {
  header nav {
    width: 80%;
    float: right;
  }

  /* Hide the hamburger menu on larger screens by default */
  #hideshowmenu {
    display: none;
  }

  /* Always show the navigation on larger screens by default */
  #menu {
    display: block;
  }

  /* Desktop hamburger menu for >5 items */
  header nav.has-many-items #hideshowmenu {
    display: inline-block;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    width: 33px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    position: relative;
    float: right;
    margin-top: 12px;
    margin-right: 20px;
  }

  header nav.has-many-items #hideshowmenu .text {
    display: none;
  }

  header nav.has-many-items #hideshowmenu:hover {
    background: rgba(0, 0, 0, 0.3);
  }

  header nav.has-many-items #menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    min-width: 200px;
    z-index: 1000;
  }

  /* Arrow pointing up */
  header nav.has-many-items #menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 25px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
  }

  header nav.has-many-items #menu.active {
    display: block;
  }

  header nav.has-many-items #menu li {
    display: block;
    margin: 0;
  }

  header nav.has-many-items #menu li a {
    color: #333;
    padding: 10px 20px;
    display: block;
    margin: 0;
    float: none;
    border-radius: 0;
  }

  header nav.has-many-items #menu li a:hover {
    background: #f5f5f5;
  }

  header nav.has-many-items #menu li a.active {
    background: #4a90e2;
    color: white;
    border-radius: 0;
  }
}

@media only screen and (min-width: 1201px) {
  header nav {
    width: 75%;
  }
}
