/* Cards */
.card {
  background-color: rgba(255, 255, 255, 0.07) !important;
  color: var(--light-text-color) !important;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  padding: 20px;
  margin-bottom: 10px;
  width: 100%;
  transition: transform 0.3s;
}

.card .card-title,
.card .card-body,
.card h1,
.card h2,
.card h3,
.card h4,
.card p,
.card li {
  color: var(--light-text-color) !important;
}

.card:hover {
  transform: translateY(-2px);
}

.card-projects img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

/* Education: Platzi / Udemy — badge shrink-wraps the logo, aligned to the left; symmetric padding */
#education .edu-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Prevents stretch when .card-body (or .card) is a column flex container */
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding-block: 12px;
  padding-inline: 14px;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

/*
  .card-projects img uses width: 100% (loads before Bootstrap; some layouts still stretch the img).
  !important keeps the logo intrinsic width so white padding is even on both sides of the artwork.
*/
#education .edu-logo-badge img {
  display: block;
  flex: 0 0 auto;
  height: 32px;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  object-fit: contain;
  margin: 0 !important;
}

#education .edu-logo-badge + h3 {
  margin-top: 0 !important;
}

/* Experience: same white tile for every employer logo (avoids tiny “floating” boxes on dark cards) */
#experience .experience-logo-wrap {
  width: 112px;
  height: 112px;
  margin-bottom: 15px;
  flex-shrink: 0;
  background-color: #ffffff !important;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  /* Large PNGs (e.g. Triko) must not paint outside the white tile */
  overflow: hidden;
}

#experience .experience-logo-wrap img.experience-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  /* Flex default min-width:auto uses intrinsic image width and breaks out of the tile */
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  margin: 0 !important;
  display: block;
}

/* MoBi: wide logo on white — same tile; contain keeps the full mark visible */
#experience .experience-logo-wrap--mobi {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#experience .experience-logo-wrap--mobi img.experience-logo--mobi {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}