/* ==========================================================================
   Texium Solutions — Expertise Card widget
   A single reusable card: image with an overlapping circular icon,
   number, title, short heading, description, button. Meant to be placed
   several times inside a native Elementor Container to build a section
   like "Our Expertise" — this file has no opinion on how many cards
   exist or how they're arranged, only the individual card.
   Consumes design tokens from theme.css only.
   ========================================================================== */

.texium-expertise-card {
  --texium-expertise-icon-size: 64px;

  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: 1px solid var(--texium-border);
  border-radius: var(--texium-radius-xl);
  overflow: hidden;
  isolation: isolate;
  height: 100%;
  transition: transform var(--texium-transition-normal), box-shadow var(--texium-transition-normal);
}

@media (prefers-reduced-motion: reduce) {
  .texium-expertise-card {
    transition: none;
  }
}

/* ---- Media ---- */

.texium-expertise-card__media {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
}

.texium-expertise-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform var(--texium-transition-normal);
}

@media (hover: hover) {
  .texium-expertise-card:hover .texium-expertise-card__image {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .texium-expertise-card__image {
    transition: none;
  }
}

.texium-expertise-card__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: rgba(18, 59, 143, 0.08);
}

/* ---- Icon ----
   Overlaps the image/content boundary: negative top margin pulls it up
   by roughly half its own height, so it straddles the seam sitting
   slightly toward the content side rather than fully above the image. */

.texium-expertise-card__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--texium-expertise-icon-size);
  height: var(--texium-expertise-icon-size);
  margin-top: calc(-0.5 * var(--texium-expertise-icon-size));
  margin-left: var(--texium-space-lg);
  border: 4px solid #fff;
  border-radius: 50%;
  background-color: var(--texium-primary);
  color: #fff;
  flex-shrink: 0;
}

.texium-expertise-card__icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.texium-expertise-card__icon i {
  font-size: 26px;
}

/* ---- Content ---- */

.texium-expertise-card__content {
  display: flex;
  flex-direction: column;
  gap: var(--texium-space-xs);
  padding: var(--texium-space-lg);
  padding-top: var(--texium-space-sm);
}

.texium-expertise-card__number {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--texium-tracking-wide);
  text-transform: uppercase;
  color: var(--texium-x-cyan);
}

.texium-expertise-card__title {
  margin: 0;
  font-family: var(--texium-font-heading);
  font-size: 26px;
  font-weight: 700;
  line-height: var(--texium-leading-tight);
  color: var(--texium-heading);
}

.texium-expertise-card__short-heading {
  font-size: 18px;
  font-weight: 600;
  line-height: var(--texium-leading-heading);
  color: var(--texium-primary);
}

.texium-expertise-card__description {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--texium-text-muted);
}

/* ---- Button ---- */

.texium-expertise-card__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--texium-space-xs);
  align-self: flex-start;
  font-size: var(--texium-font-size-sm);
  font-weight: var(--texium-weight-semibold);
  color: var(--texium-primary);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--texium-radius-pill);
  background-color: transparent;
  transition: color var(--texium-transition-fast), background-color var(--texium-transition-fast), border-color var(--texium-transition-fast);
}

.texium-expertise-card__button:hover,
.texium-expertise-card__button:focus-visible {
  color: var(--texium-primary-dark);
}

.texium-expertise-card__button:focus-visible {
  outline: 2px solid var(--texium-accent);
  outline-offset: 3px;
}

.texium-expertise-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.texium-expertise-card__arrow svg {
  width: 100%;
  height: 100%;
  transform: rotate(-45deg);
  transition: transform var(--texium-transition-fast);
}

.texium-expertise-card__button:hover .texium-expertise-card__arrow svg,
.texium-expertise-card__button:focus-visible .texium-expertise-card__arrow svg {
  transform: rotate(-45deg) translate(15%, -15%);
}

@media (prefers-reduced-motion: reduce) {
  .texium-expertise-card__arrow svg,
  .texium-expertise-card__button {
    transition: none;
  }
}

/* ---- Responsive ----
   The widget itself never sets column counts — that's the parent
   Elementor Container's job. This only tightens the card's own image
   height/typography at smaller widths so it doesn't feel oversized
   inside a narrower column. */

@media (max-width: 1024px) {
  .texium-expertise-card__media {
    height: 170px;
  }

  .texium-expertise-card__title {
    font-size: 22px;
  }

  .texium-expertise-card__short-heading {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .texium-expertise-card__media {
    height: 160px;
  }

  .texium-expertise-card__content {
    padding: var(--texium-space-md);
  }

  .texium-expertise-card__title {
    font-size: 20px;
  }
}
