/* ==========================================================================
   Marketing Services Block
   ========================================================================== */

/* --- Palette --- */
:root {
  --ms-green: #b9ff66;
  --ms-grey: #f3f3f3;
  --ms-dark: #191a23;
  --ms-black: #000000;
  --ms-white: #ffffff;
}

/* --- Section --- */
.ms-section {
  padding: 2.5rem 0;
}

/* --- Section Header --- */
.ms-header {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.ms-header__badge {
  display: inline-block;
  border-radius: 7px;
  padding: 0 7px;
  flex-shrink: 0;
}

.ms-header__title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ms-black);
  margin: 0;
}

.ms-header__desc {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ms-black);
  max-width: 580px;
  margin: 0;
}

/* --- Cards Grid --- */
.ms-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

/* --- Card Link Wrapper --- */
.ms-card {
  display: flex;
  text-decoration: none;
  color: inherit;
  width: 100%;
  min-width: 0;
}

.ms-card:hover {
  text-decoration: none;
  color: inherit;
}

/* --- Card Inner --- */
.ms-card__inner {
  border-radius: 45px;
  border: 1px solid var(--ms-dark);
  padding: 50px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 5px 0px 0px rgba(25, 26, 35, 1);
  min-height: 310px;
  width: 100%;
  transition: transform 0.2s ease;
}

.ms-card:hover .ms-card__inner {
  transform: translateY(-3px);
}

/* --- Card Left Content --- */
.ms-card__content {
  display: flex;
  flex-direction: column;
  gap: 93px;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* --- Card Title Tags --- */
.ms-card__tags {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  justify-content: flex-start;
}

.ms-card__tag {
  border-radius: 7px;
  padding: 0 7px;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-shrink: 0;
  width: fit-content;
}

.ms-card__tag h3 {
  color: var(--ms-black);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

/* --- Card Image --- */
.ms-card__image {
  flex-shrink: 0;
  width: 210px;
  height: 170px;
  position: relative;
}

.ms-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  left: 0;
  top: 0;
}

/* ==========================================================================
   Animated Arrow Button
   
   CSS variables used:
     --clr        : button background color
     --clr-text   : button text color AND circle background
     --clr-arrow  : arrow SVG color (same as --clr by default)
   ========================================================================== */

.ms-card .button {
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  border: none;
  cursor: pointer;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--clr);
  color: var(--clr-text, #fff);
  border-radius: 10rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  padding-left: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s;
}

.ms-card .button__icon-wrapper {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  position: relative;
  color: var(--clr);
  background-color: var(--clr-text, #fff);
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.ms-card .button:hover {
  /* Keep the same bg on hover since the whole card is clickable */
  background-color: var(--clr);
  opacity: 0.9;
}

.ms-card .button__icon-svg--copy {
  position: absolute;
  transform: translate(-150%, 150%);
  color: inherit;
}

.ms-card .button:hover .button__icon-svg:first-child {
  transition: transform 0.3s ease-in-out;
  transform: translate(150%, -150%);
}

.ms-card .button:hover .button__icon-svg--copy {
  transition: transform 0.3s ease-in-out 0.1s;
  transform: translate(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1279px) {
  .ms-header__title {
    font-size: 2.25rem;
  }
}

@media (max-width: 1023px) {
  .ms-header__title {
    font-size: 2rem;
  }

  .ms-card__tag h3 {
    font-size: 1.5rem;
  }

  .ms-card__inner {
    padding: 40px;
  }

  .ms-card__content {
    gap: 60px;
  }
}

@media (max-width: 767px) {
  .ms-grid {
    grid-template-columns: 1fr;
  }

  .ms-header {
    flex-direction: column;
    gap: 1rem;
  }

  .ms-header__title {
    font-size: 1.75rem;
  }

  .ms-header__desc {
    max-width: 100%;
  }

  .ms-card__inner {
    padding: 30px;
    border-radius: 35px;
    min-height: auto;
  }

  .ms-card__content {
    gap: 50px;
  }

  .ms-card__tag h3 {
    font-size: 1.375rem;
  }

  .ms-card__image {
    width: 160px;
    height: 130px;
  }
}

@media (max-width: 575px) {
  .ms-header__title {
    font-size: 1.5rem;
  }

  .ms-card__inner {
    padding: 24px;
    border-radius: 30px;
  }

  .ms-card__content {
    gap: 40px;
  }

  .ms-card__tag h3 {
    font-size: 1.25rem;
  }

  .ms-card__image {
    width: 120px;
    height: 100px;
  }
}