/* Fix social share icons alignment */
#single aside.social .social-content ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
}

#single aside.social .social-content ul li a i {
  font-size: 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fix mobile navbar background - add distinct background for mobile menu */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    margin-top: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
  }

  .dark .navbar-collapse {
    background-color: rgba(52, 211, 153, 0.12) !important;
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.15);
  }

  .navbar-collapse .navbar-nav {
    margin-top: 0.5rem;
  }

  .navbar-collapse .nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    margin-bottom: 0.25rem;
  }

  .navbar-collapse .nav-link:hover {
    background-color: rgba(16, 185, 129, 0.2) !important;
  }

  .dark .navbar-collapse .nav-link:hover {
    background-color: rgba(52, 211, 153, 0.18) !important;
  }
}

/* Fix searchbar dropdown with softer colors */
section#search-content {
  background-color: rgba(230, 240, 250, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(150, 170, 190, 0.2) !important;
}

.dark section#search-content {
  background-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(200, 200, 200, 0.3) !important;
}

body.dark section#search-content {
  background-color: rgba(30, 41, 59, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#search-results .card {
  background-color: transparent !important;
}

#search-results .card:hover {
  background-color: rgba(16, 185, 129, 0.06) !important;
}

.dark #search-results .card:hover,
body.dark #search-results .card:hover {
  background-color: rgba(52, 211, 153, 0.08) !important;
}

/* Resize blog page cards */
#list-page .card > .card-header .card-img-top {
  height: 140px !important;
}

/* Resize recent post cards in footer */
footer .card > .card-header .card-img-top {
  height: 120px !important;
}

/* Make card bodies more compact */
footer .card-body {
  padding: 0.75rem 1rem !important;
}

#list-page .card-body {
  padding: 1rem !important;
}

/* Make entire card clickable */
.clickable-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.dark .clickable-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
}

/* Ensure titles wrap properly */
#list-page .card-title,
footer .card-title {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

#list-page .card-title h5,
footer .card-title h5 {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
  color: inherit;
}

/* Make all blog cards same height - force uniform size */
#list-page .card,
footer .card {
  display: flex;
  flex-direction: column;
}

#list-page .card-body,
footer .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

/* Make all blog cards same height */
#list-page .card-text,
footer .card-text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.4;
  min-height: 84px;
  max-height: 84px;
}

#list-page .card-text p,
footer .card-text p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 84px;
  max-height: 84px;
  margin: 0;
}

#list-page .card-text p:empty,
footer .card-text p:empty {
  min-height: 84px;
  max-height: 84px;
}

#list-page .card-text p:empty::before,
footer .card-text p:empty::before {
  content: "\00a0";
  white-space: pre;
}

/* Add border between company tabs and content in experience section */
#experience .nav-pills {
  border-bottom: 2px solid rgba(16, 185, 129, 0.3) !important;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem !important;
  justify-content: center !important;
  gap: 0.5rem !important;
}

#experience .tab-content {
  padding-top: 0.5rem;
}

/* Clean company tab styling */
#experience .nav-item .nav-link {
  opacity: 0.7 !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  padding: 0.5rem 1rem !important;
  background-color: transparent !important;
  transition: all 0.2s ease !important;
  font-weight: 500 !important;
}

#experience .nav-item .nav-link:hover {
  opacity: 1 !important;
}

/* Two alternating colors for tabs */
#experience .nav-item:nth-child(odd) .nav-link {
  color: #10b981 !important;
}

#experience .nav-item:nth-child(even) .nav-link {
  color: #3b82f6 !important;
}

/* Dark mode - brighter colors for readability */
.dark #experience .nav-item:nth-child(odd) .nav-link,
body.dark #experience .nav-item:nth-child(odd) .nav-link {
  color: #34d399 !important;
}

.dark #experience .nav-item:nth-child(even) .nav-link,
body.dark #experience .nav-item:nth-child(even) .nav-link {
  color: #60a5fa !important;
}

/* Active company tab - single color for all tabs */
#experience .nav-pills .nav-item .nav-link.active {
  opacity: 1 !important;
  font-weight: 600 !important;
  color: #10b981 !important;
  border-bottom: 2px solid #10b981 !important;
  background-color: transparent !important;
}

/* Dark mode active tab */
.dark #experience .nav-pills .nav-item .nav-link.active,
body.dark #experience .nav-pills .nav-item .nav-link.active {
  color: #34d399 !important;
  border-bottom: 2px solid #34d399 !important;
}
