/* DigiTera services additions: scoped decorative previews and accessible motion. */
.services-section .service-card--motion,
.services-section .service-card--automation {
  border-color: #c9ddf5;
  background: linear-gradient(145deg, #f4f8fe, #e9f3ff);
}
.services-section .service-list details summary:focus-visible {
  outline: 3px solid #2075da;
  outline-offset: 6px;
  border-radius: 8px;
}
.services-section .service-preview {
  position: relative;
  display: flex;
  height: 110px;
  width: 100%;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 14px;
  isolation: isolate;
}
.services-section .motion-preview {
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #133772, #2868bd 55%, #4ac2dc);
}
.services-section .motion-preview__ring {
  position: absolute;
  height: 158px;
  width: 158px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 34%;
  transform: rotate(18deg);
  animation: digitera-ring-spin 12s linear infinite;
}
.services-section .motion-preview__ring--inner {
  height: 112px;
  width: 112px;
  border-width: 2px;
  border-radius: 25%;
  transform: rotate(-18deg);
  animation-direction: reverse;
  animation-duration: 9s;
}
.services-section .motion-preview__star {
  position: relative;
  z-index: 1;
  color: #fff;
  font-size: 35px;
  text-shadow: 0 0 22px #bceeff;
  animation: digitera-spark-pulse 3s ease-in-out infinite;
}
.services-section .service-preview__label {
  position: absolute;
  left: 13px;
  bottom: 9px;
  font-size: 9px;
  letter-spacing: .12em;
  color: #fff;
  font-weight: 700;
}
.services-section .automation-preview {
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  background: linear-gradient(125deg, #e2f3ff, #d2e5fc);
  border: 1px solid #bbdcf5;
}
.services-section .automation-preview__node {
  display: grid;
  place-items: center;
  flex: 0 1 65px;
  min-width: 0;
  height: 41px;
  border-radius: 10px;
  background: #fff;
  color: #285581;
  box-shadow: 0 5px 12px #164d7d1a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}
.services-section .automation-preview__node--ai {
  flex-basis: 49px;
  background: #145bdf;
  color: #fff;
  animation: digitera-spark-pulse 3s ease-in-out infinite;
}
.services-section .automation-preview__line {
  position: relative;
  flex: 1 1 15px;
  min-width: 8px;
  max-width: 28px;
  height: 2px;
  background: #80addb;
}
.services-section .automation-preview__line::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2187d9;
  animation: digitera-data-flow 2.4s ease-in-out infinite;
}
@keyframes digitera-ring-spin {
  from { transform: rotate(18deg); }
  to { transform: rotate(378deg); }
}
@keyframes digitera-spark-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.13); opacity: .8; }
}
@keyframes digitera-data-flow {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(22px); opacity: 0; }
}
@media (max-width: 600px) {
  .services-section .service-preview { height: 95px; }
  .services-section .automation-preview__node { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .services-section .motion-preview__ring,
  .services-section .motion-preview__star,
  .services-section .automation-preview__node--ai,
  .services-section .automation-preview__line::after {
    animation: none !important;
  }
  .services-section .service-list details,
  .services-section .service-list details:hover {
    transition: none !important;
    transform: none !important;
  }
}

/* Resources now live in top-level navigation, not the Services accordion. */
.desktop-nav { gap: clamp(9px, 1.1vw, 20px); font-size: 11px; white-space: nowrap; }
.digitera-resources-section { scroll-margin-top: 80px; }
.digitera-resources-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.digitera-resources-grid article {
  min-width: 0;
  padding: 25px 22px;
  background: linear-gradient(145deg, #f4f8fe, #eaf3ff);
  border: 1px solid #dce7f3;
  border-radius: 19px;
}
.digitera-resources-grid article > span {
  display: block;
  margin-bottom: 25px;
  color: #226bb2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
}
.digitera-resources-grid h3 { font-size: 19px; line-height: 1.3; color: #102b50; }
.digitera-resources-grid p { margin-top: 10px; font-size: 13px; color: #526d87; }
.digitera-resources-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 23px;
}
.digitera-resources-footer p { max-width: 660px; color: #526d87; font-size: 13px; }
.digitera-resources-footer .button { flex-shrink: 0; }
@media (max-width: 1100px) {
  .digitera-resources-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .desktop-nav, .site-header .header-cta { display: none !important; }
  .site-header .menu-toggle {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; flex-shrink: 0; width: 46px; height: 46px; margin-left: auto;
    padding: 13px; border: 1px solid #ffffff5a; border-radius: 50%;
  }
  .site-header .menu-toggle span {
    display: block; width: 17px; height: 2px; background: #fff;
    transition: transform .2s ease;
  }
  .site-header .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .site-header .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .site-header .mobile-nav {
    display: flex; flex-direction: column; position: absolute;
    top: calc(100% + 7px); left: 0; right: 0;
    padding: 12px 22px 20px; max-height: min(70vh, 540px); overflow-y: auto;
    border: 1px solid #345d88; border-radius: 18px;
    background: #08294f; color: #fff;
    box-shadow: 0 20px 44px #06244d47;
    z-index: 20;
  }
  .site-header .mobile-nav a {
    display: block; padding: 12px 0; font-size: 14px;
    border-bottom: 1px solid #ffffff2a;
  }
}
@media (max-width: 600px) {
  .digitera-resources-grid { grid-template-columns: 1fr; gap: 12px; }
  .digitera-resources-grid article { padding: 22px 20px; }
  .digitera-resources-grid article > span { margin-bottom: 14px; }
  .digitera-resources-footer { align-items: stretch; flex-direction: column; }
  .digitera-resources-footer .button { align-self: flex-start; }
}

/* Keep the classic horizontal navigation on desktop/tablet views. */
@media (min-width: 601px) and (max-width: 850px) {
  .site-header .desktop-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(4px, .7vw, 9px);
    font-size: 10px;
    white-space: nowrap;
    min-width: 0;
  }
  .site-header .brand { flex-shrink: 0; }
  .site-header .header-cta { display: none; }
  .site-header .menu-toggle { display: none; }
}
@media (min-width: 601px) and (max-width: 700px) {
  .site-header .desktop-nav { gap: 4px; font-size: 9px; }
  .site-header .brand-icon { width: 34px; height: 34px; }
  .site-header .brand-icon img { width: 76px; left: -21px; top: -21px; }
  .site-header .brand-name { font-size: 18px; }
  .site-header .brand-name small { font-size: 5px; letter-spacing: .7px; }
  .site-header { padding-inline: 12px; }
}
