
/* Custom CSS for Categories, Hover, Back button and Dark Mode */

/* Category/Tag Styling */
.post-category {
  display: inline-block;
  background-color: #80d0c7;
  color: #ffffff;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 14px;
  margin-right: 10px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.post-category:hover {
  background-color: #5cbbad;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Section with light blue background */
.section.bg-secondary {
  background-color: #80d0c7 !important;
}

.section.bg-secondary h1, 
.section.bg-secondary h2, 
.section.bg-secondary h3, 
.section.bg-secondary p {
  color: #ffffff;
  font-weight: bold;
}

/* Hover Effect for Menu Links */
.navbar-nav .nav-link:hover {
  color: #80d0c7 !important;
}

a:hover {
  color: #80d0c7;
  text-decoration: none;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #80d0c7;
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #5cbbad;
  transform: translateY(-5px);
}

/* Table of Contents */
.toc-container {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 30px;
  border-left: 4px solid #80d0c7;
}

.toc-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toc-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.toc-content.show {
  max-height: 1000px;
}

.toc-content ul {
  list-style-type: none;
  padding-left: 15px;
}

.toc-content ul li {
  margin-bottom: 8px;
}

.toc-content ul li a {
  color: #555;
  text-decoration: none;
  transition: all 0.3s ease;
}

.toc-content ul li a:hover {
  color: #80d0c7;
  padding-left: 5px;
}

/* Dark Mode */
body.dark-mode {
  background-color: #222;
  color: #eee;
}

body.dark-mode .navbar,
body.dark-mode .footer,
body.dark-mode .content {
  background-color: #333;
  color: #eee;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode p,
body.dark-mode a {
  color: #eee;
}

body.dark-mode .card,
body.dark-mode .post,
body.dark-mode .widget {
  background-color: #444;
  border-color: #555;
}

body.dark-mode .post-category {
  background-color: #555;
  color: #fff;
}

body.dark-mode .toc-container {
  background-color: #444;
  border-left-color: #80d0c7;
}

.dark-mode-toggle {
  cursor: pointer;
  margin-left: 15px;
  font-size: 20px;
  color: #333;
}

body.dark-mode .dark-mode-toggle {
  color: #eee;
}
/* Improved category/tag styling */
.category-container {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.category-container:empty {
  display: none;
}

.category-cloud {
  display: inline-block;
  padding: 5px 12px;
  margin: 0 4px 6px 0;
  border-radius: 20px;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white !important;
  transition: transform 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.category-cloud:hover {
  transform: scale(1.05);
  text-decoration: none;
}

.tag-cloud {
  display: inline-block;
  padding: 4px 10px;
  margin: 0 3px 5px 0;
  border-radius: 20px;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white !important;
  transition: transform 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.tags-container:empty {
  display: none;
}

.tag-cloud:hover {
  transform: scale(1.05);
  text-decoration: none;
}

/* Improved responsiveness */
@media (max-width: 768px) {
  .category-cloud, .tag-cloud {
    max-width: 120px;
    margin-bottom: 5px;
  }
  
  .category-container {
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .category-cloud, .tag-cloud {
    max-width: 100px;
    font-size: 0.8rem;
    padding: 4px 8px;
  }
}

/* Add spacing before footer */
.section:last-of-type {
  margin-bottom: 50px;
}

/* Footer styling */
.bg-footer {
  background-color: #2a3b4c;
  color: #f8f9fa;
  padding-top: 20px;
  margin-top: 20px;
  position: relative;
}

.footer-wave {
  position: absolute;
  top: -100px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.footer-wave svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 100px;
}

.footer-wave .shape-fill {
  fill: #2a3b4c;
}

.footer-main {
  padding: 20px 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
}

.footer-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-title:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background: #5accf5;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #f8f9fa;
  transition: all 0.3s;
}

.footer-text li {
  margin-bottom: 8px;
  color: #d1d9e6;
}

.footer-links a:hover {
  color: #5accf5;
  text-decoration: none;
  padding-left: 5px;
}

.social-icons {
  display: flex;
  margin-top: 20px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  color: #fff;
  margin-right: 10px;
  transition: all 0.3s;
}

.social-icon:hover {
  background-color: #5accf5;
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  background-color: rgba(0,0,0,0.2);
  padding: 15px 0;
  margin-top: 40px;
}

.footer-logo {
  max-height: 60px;
  margin-bottom: 20px;
}

.footer-content {
  padding: 0 0 30px;
}

.copyright {
  color: #adb5bd;
  font-size: 14px;
}

/* Ad container styling */
.ad-container {
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  margin: 30px 0;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  transition: all 0.3s;
}

.ad-container:hover {
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.ad-placeholder {
  text-align: center;
  padding: 30px;
  border: 1px dashed #dee2e6;
}

/* Improve card styling */
.equal-height-cards .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-image-container {
  overflow: hidden;
  position: relative;
}

.post-image-container img {
  transition: transform 0.3s ease;
}

.post-image-container:hover img {
  transform: scale(1.05);
}
