/* ========================================
   SECM PAGE MODULE
   Trust Anchor, What is SECM, Why Sensolytics, System Architecture
   ======================================== */

/* ========================================
   TRUST ANCHOR - Credibility Strip
   ======================================== */

.sx-trust-anchor {
  background: var(--color-bg-light-gray);
  padding: 40px 0;
  text-align: center;
}

.sx-trust-text {
  font-size: 1.3rem;
  line-height: 1.7;
  color: var(--color-text);
  max-width: 900px;
  margin: 0 auto 30px auto;
  text-align: center;
}

.sx-trust-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.sx-trust-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.sx-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-brand-blue);
  font-family: var(--font-headings);
}

.sx-stat-label {
  font-size: var(--font-size-small);
  color: var(--color-brand-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   WHAT IS SECM - Educational Section
   ======================================== */

.sx-what-is-secm {
  background: var(--color-bg-white);
  padding: var(--space-section) 0;
}

.sx-content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.sx-content-text {
  /* Text styling inherited from base */
}

.sx-content-visual {
  /* Visual container */
}

/* SECM Diagram Styling */
.sx-secm-diagram {
  background: var(--color-bg-extra-light-gray);
  padding: 30px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.sx-secm-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.sx-diagram-caption {
  margin-top: 15px;
  font-size: var(--font-size-small);
  color: var(--color-brand-gray);
  text-align: center;
  font-style: italic;
}

/* ========================================
   WHY SENSOLYTICS - Benefits Grid
   ======================================== */

.sx-why-sensolytics {
  background: var(--color-bg-light-gray);
  padding: var(--space-section) 0;
}

.sx-section-header {
  text-align: center;
  margin-bottom: 60px;
}

.sx-section-header .sx-title {
  text-align: center;
}

.sx-benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.sx-benefit-card {
  text-align: center;
  padding: 0;
}

.sx-benefit-icon {
  margin: 0 auto 25px auto;
  width: 80px;
  height: 80px;
}

.sx-benefit-card h3 {
  font-family: var(--font-headings);
  font-size: var(--font-size-h4);
  color: var(--color-brand-gray);
  margin: 0 0 15px 0;
  font-weight: 600;
}

.sx-benefit-card p {
  font-size: var(--font-size-body);
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

/* ========================================
   SYSTEM ARCHITECTURE - Interactive
   ======================================== */

.sx-system-architecture {
  background: var(--color-bg-white);
  padding: var(--space-section) 0;
  margin-top: 40px;
}

/* Interaction Hint */
.sx-interaction-hint {
  text-align: center;
  font-size: var(--font-size-small);
  color: var(--color-brand-gray);
  margin-top: 10px;
  font-style: italic;
}

.sx-hint-mobile {
  display: none;
}

.sx-architecture-wrapper {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 60px;
  align-items: start;
}

/* ========================================
   LEFT SIDE: Architecture Layers
   ======================================== */

.sx-architecture-diagram {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sx-arch-layer {
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Layer Header (contains label + arrow) */
.sx-arch-layer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 10px;
}

.sx-arch-layer-label {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-grow: 1;
}

.sx-arch-number {
  font-size: var(--font-size-small);
  font-weight: 700;
  color: var(--color-brand-blue);
  background: rgba(45, 132, 205, 0.1);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.sx-arch-name {
  font-size: var(--font-size-h5);
  font-weight: 600;
  color: var(--color-brand-gray);
  flex-grow: 1;
}

.sx-arch-badge {
  font-size: var(--font-size-small);
  color: var(--color-brand-blue);
  background: rgba(45, 132, 205, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}

/* Arrow Affordance (→) */
.sx-arch-arrow {
  font-size: 1.5rem;
  color: rgba(45, 132, 205, 0.4);
  font-weight: 300;
  transition: all 0.3s ease;
  margin-left: 10px;
}

.sx-arch-layer-bar {
  height: 50px;
  background: linear-gradient(135deg, rgba(45, 132, 205, 0.15), rgba(45, 132, 205, 0.05));
  border-left: 4px solid rgba(45, 132, 205, 0.3);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  transition: all 0.3s ease;
}

/* Hover State */
.sx-arch-layer:hover .sx-arch-layer-bar {
  background: linear-gradient(135deg, rgba(45, 132, 205, 0.25), rgba(45, 132, 205, 0.1));
  border-left-color: rgba(45, 132, 205, 0.6);
  transform: translateX(5px);
}

.sx-arch-layer:hover .sx-arch-arrow {
  color: var(--color-brand-blue);
  transform: translateX(5px);
}

/* Active State */
.sx-arch-layer.active .sx-arch-layer-bar {
  background: linear-gradient(135deg, rgba(45, 132, 205, 0.3), rgba(45, 132, 205, 0.15));
  border-left-color: var(--color-brand-blue);
  border-left-width: 5px;
}

.sx-arch-layer.active .sx-arch-number {
  background: var(--color-brand-blue);
  color: var(--color-white);
}

.sx-arch-layer.active .sx-arch-arrow {
  color: var(--color-brand-blue);
}

/* Optional Layer Styling */
.sx-arch-layer-optional .sx-arch-layer-bar {
  border-left-style: dashed;
}

/* Mobile Accordion Content (Hidden on Desktop) */
.sx-arch-mobile-content {
  display: none;
  padding: 20px;
  background: var(--color-bg-extra-light-gray);
  border-radius: var(--border-radius);
  margin-top: 10px;
}

/* ========================================
   RIGHT SIDE: Detail Panels (Desktop)
   ======================================== */

.sx-architecture-details {
  position: relative;
  min-height: 500px;
}

.sx-detail-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  background: var(--color-bg-extra-light-gray);
  padding: 40px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
}

.sx-detail-panel.active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Detail Image */
.sx-detail-image {
  width: 100%;
  margin-bottom: 25px;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.sx-detail-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.sx-detail-panel h4 {
  font-family: var(--font-headings);
  font-size: var(--font-size-h3);
  color: var(--color-brand-gray);
  margin: 0 0 20px 0;
  font-weight: 700;
}

/* Bullet List */
.sx-detail-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.sx-detail-bullets li {
  font-size: var(--font-size-body);
  line-height: 1.7;
  color: var(--color-text);
  padding-left: 25px;
  margin-bottom: 12px;
  position: relative;
}

.sx-detail-bullets li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--color-brand-blue);
  font-weight: bold;
  font-size: 1.1rem;
}

/* Use Case */
.sx-detail-usecase {
  font-size: var(--font-size-body);
  line-height: 1.6;
  color: var(--color-text);
  margin: 15px 0;
  padding: 15px;
  background: rgba(45, 132, 205, 0.05);
  border-left: 3px solid var(--color-brand-blue);
  border-radius: var(--border-radius-sm);
}

.sx-detail-usecase strong {
  color: var(--color-brand-blue);
}

/* Specs */
.sx-detail-specs {
  font-size: var(--font-size-small);
  color: var(--color-brand-gray);
  margin: 10px 0 0 0;
  font-family: var(--font-mono);
}

.sx-detail-specs strong {
  color: var(--color-brand-blue);
  font-weight: 600;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets (≤1024px) */
@media (max-width: 1024px) {
  .sx-architecture-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sx-architecture-diagram {
    position: relative;
    top: 0;
  }

  .sx-architecture-details {
    min-height: auto;
  }

  .sx-hint-desktop {
    display: none;
  }

  .sx-hint-mobile {
    display: inline;
  }

  /* MOBILE: Show accordion, hide desktop panel */
  .sx-architecture-details {
    display: none;
  }

  .sx-arch-mobile-content {
    display: none; /* Hidden by default */
  }

  .sx-arch-layer.active .sx-arch-mobile-content {
    display: block; /* Show when layer is active/clicked */
  }

  .sx-detail-image-mobile {
    width: 100%;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-white);
  }

  .sx-detail-image-mobile img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
  }

  .sx-arch-mobile-content h4 {
    font-family: var(--font-headings);
    font-size: var(--font-size-h4);
    color: var(--color-brand-gray);
    margin: 0 0 15px 0;
    font-weight: 700;
  }
}

/* Mobile Portrait (≤480px) */
@media (max-width: 480px) {
  .sx-arch-layer-header {
    gap: 5px;
  }

  .sx-arch-name {
    font-size: var(--font-size-body);
  }

  .sx-arch-layer-bar {
    height: 40px;
  }

  .sx-arch-mobile-content {
    padding: 15px;
  }

  .sx-detail-usecase,
  .sx-detail-specs {
    font-size: var(--font-size-small);
  }
}
/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablets (≤1024px) */
@media (max-width: 1024px) {
  .sx-content-split,
  .sx-architecture-wrapper {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sx-benefits-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Mobile Landscape (≤768px) */
@media (max-width: 768px) {
  .sx-trust-stats {
    gap: 40px;
  }

  .sx-stat-number {
    font-size: 1.6rem;
  }

  .sx-trust-anchor,
  .sx-what-is-secm,
  .sx-why-sensolytics,
  .sx-system-architecture {
    padding: var(--space-section-sm) 0;
  }

  .sx-section-header {
    margin-bottom: 40px;
  }

  .sx-detail-panel {
    padding: 30px;
  }

  .sx-arch-layer-label {
    gap: 10px;
  }

  .sx-arch-name {
    font-size: var(--font-size-body);
  }
}

/* Mobile Portrait (≤480px) */
@media (max-width: 480px) {
  .sx-trust-stats {
    flex-direction: column;
    gap: 25px;
  }

  .sx-detail-panel {
    padding: 25px 20px;
  }

  .sx-arch-layer-bar {
    height: 40px;
  }

  .sx-detail-panel h4 {
    font-size: var(--font-size-h4);
  }
}

/* ========================================
   ARCHITECTURE - UPDATED STYLES
   Icon-based layout with subtitles
   ======================================== */

/* Desktop: Detail Header with Icon */
.sx-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.sx-detail-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--border-radius);
  object-fit: cover;
}

.sx-detail-header h4 {
  font-family: var(--font-headings);
  font-size: var(--font-size-h3);
  color: var(--color-brand-gray);
  margin: 0 0 5px 0;
  font-weight: 700;
}

.sx-detail-subtitle {
  font-size: var(--font-size-body);
  color: var(--color-brand-blue);
  font-weight: 600;
  margin: 0;
  font-style: italic;
}

/* Intro paragraph */
.sx-detail-intro {
  font-size: var(--font-size-body);
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: 20px;
}

/* Section headings (h5) */
.sx-detail-panel h5 {
  font-family: var(--font-headings);
  font-size: var(--font-size-h5);
  color: var(--color-brand-gray);
  margin: 20px 0 10px 0;
  font-weight: 600;
}

/* Remove old image styling (large 16:9 images) */
.sx-detail-image {
  display: none; /* We're using icons now */
}

/* Mobile: Icon header */
.sx-detail-header-mobile {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
}

.sx-detail-icon-mobile {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--border-radius-sm);
  object-fit: cover;
}

.sx-detail-header-mobile h4 {
  font-size: var(--font-size-h4);
  margin: 0 0 5px 0;
}

.sx-detail-header-mobile .sx-detail-subtitle {
  font-size: var(--font-size-small);
}

/* Mobile content structure */
.sx-detail-content-mobile h5 {
  font-family: var(--font-headings);
  font-size: var(--font-size-body);
  color: var(--color-brand-gray);
  margin: 15px 0 8px 0;
  font-weight: 600;
}

.sx-detail-content-mobile .sx-detail-intro {
  font-size: var(--font-size-small);
  margin-bottom: 15px;
}

/* Remove old mobile image div */
.sx-detail-image-mobile {
  display: none; /* We're using icons now */
}

/* Adjust panel min-height for new layout */
.sx-architecture-details {
  min-height: 550px; /* Slightly taller for richer content */
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 1024px) {
  .sx-detail-header-mobile {
    gap: 12px;
  }

  .sx-detail-icon-mobile {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .sx-detail-icon-mobile {
    width: 40px;
    height: 40px;
  }

  .sx-detail-header-mobile h4 {
    font-size: var(--font-size-h5);
  }

  .sx-arch-mobile-content {
    padding: 15px;
  }

  .sx-detail-content-mobile h5 {
    font-size: var(--font-size-small);
    margin: 12px 0 6px 0;
  }
}