/* ==========================================================================
   Services mega-menu in the main header.
   Loaded globally because the header is on every page. Collapses to a plain
   link on touch and narrow screens, where a hover panel would be unusable.
   ========================================================================== */

.tz-mega {
  position: static;
  display: inline-flex;
  align-items: center;
}

.tz-mega-panel {
  display: none;
}

/* Only wide, hover-capable pointers get the panel. On a phone the "Services"
   entry stays an ordinary link straight to the hub. */
@media (min-width: 1200px) and (hover: hover) and (pointer: fine) {
  .tz-mega {
    position: relative;
  }

  .tz-mega-panel {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    z-index: 60;
    min-width: 54rem;
    background: #fff;
    border: 1px solid var(--tz-line);
    border-top: 3px solid var(--tz-red);
    border-radius: 0 0 .7rem .7rem;
    box-shadow: 0 22px 48px rgba(0, 0, 0, .14);
    padding: 1.4rem 1.6rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .14s ease, transform .14s ease;
  }

  .tz-mega:hover .tz-mega-panel,
  .tz-mega:focus-within .tz-mega-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .tz-mega-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1.4rem;
  }

  .tz-mega-head {
    display: block;
    margin-bottom: .55rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--tz-line);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tz-ink);
    text-decoration: none;
  }

  .tz-mega-head:hover {
    color: var(--tz-red);
  }

  .tz-mega-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .3rem;
  }

  .tz-mega-col a {
    font-size: .87rem;
    font-weight: 500;
    color: var(--tz-gray);
    text-decoration: none;
  }

  .tz-mega-col a:hover {
    color: var(--tz-red);
  }

  .tz-mega-cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .6rem;
    padding: 1rem;
    background: var(--tz-bg-soft);
    border-radius: .6rem;
  }

  .tz-mega-cta p {
    margin: 0;
    font-size: .87rem;
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tz-mega-panel {
    transition: none;
  }
}
