/* ==========================================================================
   ExploreNav — Shared cross-page navigation component
   ==========================================================================
   Used near the bottom of Solution, Comparison and Sector pages to guide
   visitors toward contextual solutions and editorial resources.

   All pages using this component share a dark background, so colours are
   hardcoded rather than relying on page-specific CSS variables.
   ========================================================================== */

/* Standalone-section wrapper (used when ExploreNav is included as its own
   registry section rather than nested inside a CTA card). */
.explore-nav {
  position: relative;
  padding: clamp(1rem, 2vw, 2.25rem) 0 clamp(3rem, 6vw, 5rem);
}

.explore-nav__container {
  width: min(1100px, calc(100% - 40px));
  margin-inline: auto;
}

.cta-explore {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  z-index: 2;
}

/* When ExploreNav is the whole section, the nav no longer needs the top margin
   that separated it from a CTA card above. */
.explore-nav .cta-explore {
  margin-top: 0;
}

/* Sector pages already end with a conversion card. Keep the navigation close
   enough to read as its natural continuation rather than a new page chapter. */
.sectors-page .explore-nav {
  padding-top: clamp(0.75rem, 1.5vw, 1.25rem);
  padding-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

.cta-explore__title {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--slate-400);
  margin: 0 0 1.25rem;
}

.cta-explore__grid {
  display: grid;
  grid-template-columns: repeat(var(--cta-explore-cols, 3), 1fr);
  gap: 1rem;
}

.cta-explore__card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

/* The product suite and cloud telephony are the two permanent entry points.
   Their restrained brand wash makes the hierarchy visible without turning
   this navigation block into a second conversion CTA. */
.cta-explore__card--featured {
  overflow: hidden;
  border-color: rgba(123, 92, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(123, 92, 255, 0.13), rgba(42, 115, 255, 0.055) 68%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.cta-explore__card--featured::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-violet-500), var(--brand-blue-500));
  opacity: 0.9;
}

.cta-explore__card:hover {
  transform: translateY(-2px);
  border-color: rgba(42, 115, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.cta-explore__card--featured:hover {
  border-color: rgba(123, 92, 255, 0.58);
  background:
    linear-gradient(135deg, rgba(123, 92, 255, 0.19), rgba(42, 115, 255, 0.09) 68%),
    rgba(255, 255, 255, 0.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    0 12px 30px rgba(13, 9, 45, 0.2);
}

.cta-explore__card:focus-visible,
.cta-explore__resource:focus-visible {
  outline: 2px solid var(--brand-blue-500);
  outline-offset: 3px;
}

.cta-explore__card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-explore__card-logo {
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(31, 24, 74, 0.24);
}

.cta-explore__card-label,
.cta-explore__card-desc {
  display: block;
}

.cta-explore__card-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-white);
  line-height: 1.3;
}

.cta-explore__card-desc {
  font-size: 0.76rem;
  color: var(--slate-400);
  line-height: 1.4;
  margin-top: 0.15rem;
}

.cta-explore__resources {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
}

.cta-explore__resources-title {
  flex-basis: 100%;
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--marketing-off-white-indigo);
}

.cta-explore__resource {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--marketing-off-white-indigo);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.cta-explore__resource:hover {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.14);
}

.cta-explore__card-copy {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   i18n-driven icons (data-icon / data-tone). The glyph is a CSS mask so the
   markup stays a single shared file and the icon can be chosen per card from
   the page's translations without inline SVG.
   -------------------------------------------------------------------------- */

.cta-explore__card-icon[data-icon],
.cta-explore__resource-icon[data-icon] {
  color: var(--color-white);
}

.cta-explore__card-icon[data-icon]::before,
.cta-explore__resource-icon[data-icon]::before {
  content: '';
  display: block;
  background: currentColor;
  -webkit-mask: var(--exp-ico) center / contain no-repeat;
  mask: var(--exp-ico) center / contain no-repeat;
}

.cta-explore__card-icon[data-icon]::before {
  width: 18px;
  height: 18px;
}

.cta-explore__resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--marketing-off-white-indigo);
}

.cta-explore__resource-icon[data-icon]::before {
  width: 16px;
  height: 16px;
}

/* Card icon chip tints — solid brand/core primitives from global.css (same
   approach as the original per-card inline colours, now token-based). */
.cta-explore__card-icon[data-tone='violet'] {
  background: var(--brand-violet-500);
}
.cta-explore__card-icon[data-tone='green'] {
  background: var(--brand-green-500);
}
.cta-explore__card-icon[data-tone='cyan'] {
  background: var(--cyan-500);
}
.cta-explore__card-icon[data-tone='orange'] {
  background: var(--brand-amber-500);
}
.cta-explore__card-icon[data-tone='blue'] {
  background: var(--brand-blue-500);
}
.cta-explore__card-icon[data-tone='indigo'] {
  background: var(--indigo-500);
}

/* Icon glyph library (stroke SVGs used as alpha masks). */
.cta-explore [data-icon='phone'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-3 2a11 11 0 0 0 5 5l2-3 5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='building'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21h16M6 21V7l6-4 6 4v14M10 21v-4h4v4M9 8h.01M14 8h.01M9 12h.01M14 12h.01'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='store'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h16l-1-4H5zM5 9v11h14V9M9 20v-5h6v5'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='cloud'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4 4 0 0 1-.5-8A6 6 0 0 1 18 10.5 3.5 3.5 0 0 1 17.5 18z'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='home'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7M5 10v10h5v-6h4v6h5V10'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='spark'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4.5 13.5H11L10 22l8.5-11.5H12z'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='clock'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='check'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M8.5 12.5l2.5 2.5 4.5-5'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='grid'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='6' height='6' rx='1'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='chart'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M10 20V4M16 20v-7M22 20H2'/%3E%3C/svg%3E");
}
.cta-explore [data-icon='book'] {
  --exp-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}

@media (max-width: 1024px) {
  .cta-explore__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cta-explore__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-explore__card,
  .cta-explore__resource {
    transition: none;
  }
}
