/* Page-specific styles for the /it-services/security-services/ pages.
   Loaded after site.css. All classes are prefixed "sec-" so nothing here
   affects other pages. Diagrams are plain HTML/CSS (no images). */

/* ---------- Accessibility: focus + keyboard-open dropdown ---------- */
.sec-page a:focus-visible,
.sec-page button:focus-visible,
.sec-page [tabindex]:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (min-width: 1025px) {
  .sec-page .dropdown:focus-within .dropdown-content {
    display: block;
  }
}

.sec-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 3000;
  background: white;
  color: var(--primary);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}

.sec-skip:focus {
  left: 0;
}

/* ---------- Hero ---------- */
.sec-hero {
  padding: 120px 2rem 0;
  background: var(--gradient-alt);
}

.sec-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 0 4.5rem;
  text-align: center;
}

.sec-hero h1 {
  font-size: 3rem;
  color: white;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.sec-hero-lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.sec-hero .hero-buttons {
  justify-content: center;
}

/* Overview hero: text beside illustration */
.sec-hero-split {
  max-width: 1300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: center;
  text-align: left;
}

.sec-hero-split .hero-buttons {
  justify-content: flex-start;
}

.sec-hero-media {
  background: white;
  border-radius: 24px;
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
}

.sec-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

@media (max-width: 960px) {
  .sec-hero-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
    max-width: 720px;
  }

  .sec-hero-split .hero-buttons {
    justify-content: center;
  }
}

/* Wide in-content illustration */
.sec-illustration {
  margin: 0 0 2.5rem;
  padding: 1.25rem;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.sec-illustration img {
  display: block;
  width: 100%;
  height: auto;
}

.sec-illustration figcaption {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 1rem;
}

.sec-swipe-hint {
  display: none;
}@media (max-width: 768px) {
  .sec-illustration {
    padding: 0.75rem;
  }

  /* Keep wide diagrams legible on phones: scroll inside the card */
  .sec-illustration-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sec-illustration-scroll img {
    width: 720px;
    max-width: none;
  }

  .sec-swipe-hint {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
  }
}

/* ---------- Layout ---------- */
.sec-section {
  padding: 5rem 2rem;
  background: white;
}

.sec-section.sec-alt {
  background: var(--bg-light);
}

.sec-narrow {
  max-width: 1100px;
  margin: 0 auto;
}

.sec-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  color: var(--text-dark);
  scroll-margin-top: 100px;
}

.sec-intro {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.8;
  max-width: 820px;
  margin-bottom: 2.5rem;
}

.sec-section p a,
.sec-section li a,
.sec-section td a {
  color: var(--primary);
  font-weight: 600;
}

/* ---------- Detail-page header (breadcrumb, title, back link) ----------
   Used only by the five /it-services/security-services/<slug>/ pages.
   The overview page keeps the gradient .sec-hero. */
.sec-pagehead {
  background: var(--bg-light);
  border-bottom: 1px solid #e2e8f0;
  padding: 108px 2rem 2rem;
}

.sec-pagehead-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.sec-crumbs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

.sec-crumbs li {
  display: inline-flex;
  align-items: center;
  color: var(--text-light);
}

.sec-crumbs li + li::before {
  content: "›";
  content: "›" / "";
  margin: 0 0.55rem;
  color: #94a3b8;
}

.sec-crumbs a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
}

.sec-crumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.sec-crumbs [aria-current="page"] {
  color: var(--text-dark);
  font-weight: 600;
}

.sec-pagehead h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  color: var(--text-dark);
  margin-bottom: 0.6rem;
}

.sec-pagehead-lead {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
  max-width: 780px;
  margin-bottom: 1.25rem;
}

.sec-pagehead-toc {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sec-pagehead-toc a {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  background: white;
  border: 1px solid #e2e8f0;
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.sec-pagehead-toc a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Dark focus ring: the default cyan ring is too faint on the light header */
.sec-pagehead a:focus-visible {
  outline-color: var(--primary-dark);
}

@media (max-width: 768px) {
  .sec-pagehead {
    padding: 96px 16px 1.5rem;
  }

  .sec-pagehead h1 {
    font-size: 1.8rem;
  }

  .sec-pagehead-lead {
    font-size: 1rem;
  }
}

/* ---------- Service cards (overview) ---------- */
.sec-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  list-style: none;
}

.sec-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  padding: 2.25rem;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  color: var(--text-dark);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sec-card:hover,
.sec-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.sec-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.25rem;
  color: white;
  flex-shrink: 0;
}

.sec-card-icon svg {
  display: block;
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.sec-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.sec-card ul {
  color: var(--text-light);
  padding-left: 1.2rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.sec-card p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.sec-card-more {
  margin-top: auto;
  color: var(--primary);
  font-weight: 700;
}

/* ---------- Topic cards (risk + mitigation) ---------- */
.sec-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.sec-topic {
  background: white;
  border-radius: 18px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--primary);
}

.sec-alt .sec-topic {
  background: white;
}

.sec-section:not(.sec-alt) .sec-topic {
  background: var(--bg-light);
  box-shadow: none;
}

.sec-topic h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  scroll-margin-top: 100px;
}

.sec-topic p {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.sec-topic ul {
  color: var(--text-light);
  padding-left: 1.2rem;
  line-height: 1.7;
}

.sec-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--success);
  margin-right: 0.35rem;
}

.sec-label.sec-risk {
  color: var(--danger);
}

/* ---------- Callouts ---------- */
.sec-note {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
  border-left: 5px solid var(--primary);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  line-height: 1.8;
}

.sec-note.sec-warn {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.08);
}

.sec-note strong {
  color: var(--text-dark);
}

.sec-note p + p {
  margin-top: 0.75rem;
}

/* ---------- Diagrams ---------- */
.sec-diagram {
  --sec-gap: 2.25rem;
  margin: 2.5rem 0;
  padding: 2rem;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-sm);
  border: 1px solid #e2e8f0;
}

.sec-section:not(.sec-alt) .sec-diagram {
  background: var(--bg-light);
  box-shadow: none;
}

.sec-diagram figcaption {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 1.5rem;
  line-height: 1.6;
}

.sec-diagram figcaption strong {
  color: var(--text-dark);
}

.sec-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  margin-bottom: 1.25rem;
}

.sec-flow {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: var(--sec-gap);
  counter-reset: secstep;
}

.sec-flow > li {
  position: relative;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 1rem 0.9rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sec-flow > li > strong {
  font-size: 0.98rem;
  line-height: 1.3;
}

.sec-flow > li > span {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

.sec-flow.sec-numbered > li::before {
  counter-increment: secstep;
  content: counter(secstep);
  width: 28px;
  height: 28px;
  margin: 0 auto 0.2rem;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Arrow between steps */
.sec-flow > li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--sec-gap) + 6px);
  width: calc(var(--sec-gap) - 12px);
  height: 2px;
  background: var(--primary);
  transform: translateY(-50%);
}

.sec-flow > li:not(:last-child) > .sec-arrowhead {
  position: absolute;
  top: 50%;
  right: calc(-1 * var(--sec-gap) + 4px);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--primary);
  transform: translateY(-50%);
}

/* Controls attached to a diagram node */
.sec-controls {
  list-style: none;
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sec-controls li {
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
}

.sec-flow > li > .sec-deny {
  font-size: 0.78rem;
  font-weight: 700;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  margin-top: 0.3rem;
}

/* Zone colours for the architecture diagram */
.sec-zone-public {
  border-color: var(--text-light) !important;
}

.sec-zone-edge {
  border-color: var(--warning) !important;
}

.sec-zone-gateway {
  border-color: var(--accent) !important;
}

.sec-zone-internal {
  border-color: var(--success) !important;
}

.sec-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  list-style: none;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.sec-legend li::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 3px solid currentColor;
  margin-right: 0.4rem;
  vertical-align: -2px;
}

.sec-legend .sec-zone-public::before { border-color: var(--text-light); }
.sec-legend .sec-zone-edge::before { border-color: var(--warning); }
.sec-legend .sec-zone-gateway::before { border-color: var(--accent); }
.sec-legend .sec-zone-internal::before { border-color: var(--success); }

/* Branching diagram (two sources merge into one pipeline) */
.sec-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sec-split .sec-flow > li {
  border-color: var(--secondary);
}

.sec-split .sec-flow > li:not(:last-child)::after {
  background: var(--secondary);
}

.sec-split .sec-flow > li:not(:last-child) > .sec-arrowhead {
  border-left-color: var(--secondary);
}

.sec-lane-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}

.sec-merge {
  text-align: center;
  margin: 1rem 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.sec-merge::before {
  content: "";
  display: block;
  width: 2px;
  height: 28px;
  margin: 0 auto 0.3rem;
  background: var(--primary);
}

/* ---------- Code ---------- */
.sec-page code {
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9em;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-dark);
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
}

/* ---------- Tables ---------- */
.sec-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
  -webkit-overflow-scrolling: touch;
}

.sec-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 560px;
  font-size: 0.95rem;
}

.sec-table caption {
  text-align: left;
  font-weight: 700;
  padding: 1rem 1.25rem;
  background: var(--bg-light);
}

.sec-table th,
.sec-table td {
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
  line-height: 1.6;
}

.sec-table thead th {
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.sec-table tbody th {
  font-weight: 700;
  color: var(--text-dark);
}

.sec-table td {
  color: var(--text-light);
}

.sec-yes {
  color: #047857 !important;
  font-weight: 700;
}

.sec-no {
  color: #94a3b8 !important;
}

/* ---------- Simple lists ---------- */
.sec-checklist {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem 2rem;
}

.sec-checklist li {
  position: relative;
  padding-left: 1.9rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.sec-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--success);
  font-weight: 800;
}

.sec-refs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.sec-refs a {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.sec-refs a:hover {
  background: var(--primary);
  color: white;
}

/* ---------- Related pages ---------- */
.sec-related {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.sec-related a {
  display: block;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--text-dark);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  height: 100%;
}

.sec-related a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sec-related a[aria-current="page"] {
  border-color: var(--primary);
  color: var(--primary);
  cursor: default;
}

/* ---------- CTA ---------- */
.sec-cta {
  padding: 3.5rem 2rem;
  background: var(--gradient);
  border-radius: 30px;
  color: white;
  text-align: center;
}

.sec-cta h2 {
  font-size: 2.2rem;
  color: white;
  margin-bottom: 1rem;
}

.sec-cta p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 720px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.sec-cta .hero-buttons {
  justify-content: center;
}

.sec-cta .btn-primary {
  color: var(--primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .sec-flow {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    max-width: 420px;
    margin: 0 auto;
  }

  .sec-flow > li:not(:last-child)::after {
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(-1 * var(--sec-gap) + 6px);
    width: 2px;
    height: calc(var(--sec-gap) - 12px);
    transform: translateX(-50%);
  }

  .sec-flow > li:not(:last-child) > .sec-arrowhead {
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(-1 * var(--sec-gap) + 4px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid var(--primary);
    border-bottom: 0;
    transform: translateX(-50%);
  }

  .sec-split .sec-flow > li:not(:last-child) > .sec-arrowhead {
    border-left-color: transparent;
    border-top-color: var(--secondary);
  }

  .sec-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sec-hero {
    padding: 100px 16px 0;
  }

  .sec-hero h1 {
    font-size: 2.2rem;
  }

  .sec-hero-lead {
    font-size: 1.05rem;
  }

  .sec-section {
    padding: 3.5rem 16px;
  }

  .sec-section h2,
  .sec-cta h2 {
    font-size: 1.75rem;
  }

  .sec-diagram {
    padding: 1.25rem;
  }

  .sec-cta {
    padding: 2.5rem 1.25rem;
    border-radius: 22px;
  }

  .sec-cards,
  .sec-topics,
  .sec-checklist {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .btn-secondary {
    padding: 1rem 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sec-card,
  .sec-card:hover {
    transition: none;
    transform: none;
  }
}
