/* ========================================
   AI PLATFORM PAGE SPECIFIC STYLES
   Bruviti AI Operating System for the Aftermarket
   ======================================== */

/* Remove all section background gradients */
.section:nth-child(even),
.section:nth-child(odd) {
  background: transparent;
}

/* ========================================
   LIST FEATURES - Orange Bullet Styling
   ======================================== */

.list-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-left: 0;
  line-height: 1.6;
}

.list-features li::before {
  content: '';
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--accent-orange);
  margin-top: 10px;
  border-radius: 0;
}

/* Mobile responsive adjustment */
@media (max-width: 767px) {
  .list-features li {
    gap: var(--space-2);
  }
  
  .list-features li::before {
    margin-top: 8px;
  }
}

/* ========================================
   PILLAR SECTIONS - Full Layout with Images
   ======================================== */

/* Full Card Layout - Image left, all content right */
.category-full-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--space-8);
    align-items: start;
}

/* Image Column - Clean, no borders */
.category-image-column {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    height: auto;
    min-height: 180px;
}

/* Pillar Images - Clean appearance */
.pillar-image {
    width: 100%;
    height: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s ease;
}

.pillar-image:hover {
    transform: scale(1.05);
}

/* Text Column - All content in right column */
.category-text-column {
    flex: 1;
    padding-right: var(--space-2);
}

.category-text-column .category-title {
    margin-bottom: var(--space-4);
}

.category-text-column .category-tagline {
    margin-bottom: var(--space-6);
}

/* Reduce bottom padding of hero section to minimize gap */
.section-hero {
  padding-bottom: var(--space-4); /* 16px instead of 96px */
}

/* Responsive Behavior - Mobile */
@media (max-width: 1023px) {
    .category-full-layout {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .category-image-column {
        width: 100%;
        max-width: 280px;
        margin: 0 auto var(--space-4) auto;
        min-height: 150px;
    }
    
    /* .pillar-image max-width adjusted via media query */
    
    .category-text-column {
        padding-right: 0;
    }
    
    .section-hero {
        padding-bottom: var(--space-6); /* 32px on mobile/tablet */
    }
}

/* Medium screens */
@media (min-width: 1024px) and (max-width: 1439px) {
    .category-full-layout {
        grid-template-columns: 200px 1fr;
        gap: var(--space-6);
    }
    
    .category-image-column {
        min-height: 160px;
    }
    
    .pillar-image {
        max-width: 180px;
    }
}

/* Large desktop styles */
@media (min-width: 1440px) {
    .category-full-layout {
        grid-template-columns: 260px 1fr;
        gap: var(--space-10);
    }
    
    .category-image-column {
        min-height: 200px;
    }
    
    /* .pillar-image max-width adjusted via media query */
}

/* ========================================
   PLATFORM ARCHITECTURE COMPONENTS
   ======================================== */

.architecture-component {
  padding: 0;
  background: transparent;
  border: none;
}

.architecture-component-title {
  color: var(--accent-orange);
  font-size: clamp(18px, 4vw, 20px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.architecture-component-text {
  color: var(--light-gray);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .architecture-component {
    margin-bottom: var(--space-6);
  }
  
  .architecture-component-title {
    font-size: 1rem;
  }
}

/* ========================================
   PILLAR CARD SECTIONS - Grid Layout
   No manual positioning needed - grid handles layout
   ======================================== */

/* Pillar sections now flow naturally in the content column */
.pillar-content-column .section {
  /* Natural flow - no manual positioning needed */
  margin-left: 0; /* Reset any inherited margins */
}

/* IMPROVED PILLAR CARD STYLING - More Professional Sizing */

/* Category Title - REDUCED from 2.5rem */
.category-title {
    font-size: 2rem; /* Reduced from 2.5rem */
    font-weight: 400;
    color: var(--text-white);
    margin-top: 0;
    margin-bottom: var(--space-3);
    line-height: 1.3; /* Improved line height */
    letter-spacing: -0.025em; /* Subtle letter spacing */
}

/* Category Tagline - IMPROVED */
.category-tagline {
    font-size: 1.125rem; /* Reduced from 1.25rem */
    color: var(--text-white);
    margin-bottom: var(--space-4); /* Reduced spacing */
    font-weight: 300;
    line-height: 1.5;
    max-width: 90%; /* Prevent overly long lines */
}

/* Category Text - IMPROVED */
.category-text {
    margin-top: var(--space-3); /* Reduced from var(--space-6) */
}

.category-text .text-large {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    line-height: 1.6;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-4);
}

/* MOBILE RESPONSIVE IMPROVEMENTS */
@media (max-width: 767px) {
    .category-title {
        font-size: 1.5rem; /* Smaller on mobile */
        margin-bottom: var(--space-2);
    }
    
    .category-tagline {
        font-size: 1rem;
        margin-bottom: var(--space-3);
        max-width: 100%;
    }
    
    .category-text .text-large {
        font-size: 1rem;
        line-height: 1.5;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .category-title {
        font-size: 1.625rem; /* Medium size for tablets */
    }
    
    .category-tagline {
        font-size: 1.0625rem;
    }
}

/* ========================================
   ONTOLOGY SECTION STYLING
   Consistent with site design patterns
   ======================================== */

/* Ontology Layers Container */
.ontology-layers {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Individual Layer Section */
.ontology-layer {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Layer Header with Marker and Title */
.ontology-layer__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Orange Square Marker */
.ontology-layer__marker {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--accent-orange);
  display: block;
}

/* Layer Title (Sub-header) */
.ontology-layer__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-white);
  margin: 0;
  line-height: 1.3;
}

/* Layer Description Text */
.ontology-layer__description {
  margin: 0;
  padding-left: calc(6px + var(--space-3)); /* Align with title, accounting for marker */
  color: var(--light-gray);
  font-size: 1rem;
  line-height: 1.6;
}

/* Ontology Image Styling */
.ontology-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-4) 0;
}

.ontology-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  /* Ontology Layers Mobile Adjustments */
  .ontology-layers {
    gap: var(--space-4);
  }
  
  .ontology-layer__title {
    font-size: 1rem;
  }
  
  .ontology-layer__description {
    font-size: 0.9375rem;
    padding-left: calc(6px + var(--space-2));
  }
  
  .ontology-layer__header {
    gap: var(--space-2);
  }
  
  /* Ontology Image Mobile Adjustments */
  .ontology-image-container {
    padding: var(--space-3) 0;
  }
  
  .ontology-image {
    max-width: 100%;
    border-radius: 4px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .ontology-image {
    max-width: 700px;
  }
}

@media (min-width: 1024px) {
  .ontology-image {
    max-width: 800px;
  }
}


/* ========================================
   PLATFORM ARCHITECTURE SLIDESHOW
   Mobile-first responsive design matching AIP patterns
   ======================================== */

/* Main container - Mobile first with immersive sizing */
.platform-slideshow-container {
  position: relative;
  width: 100%;
  padding: var(--space-8) 0;
  background: transparent;
  overflow: hidden;
}

/* Slideshow wrapper - Mobile first with immersive sizing */
.platform-slideshow {
  position: relative;
  width: 100%;
  min-height: 70vh;
  max-height: 600px;
  background: transparent;
  padding-bottom: var(--space-4); /* Space after dots */
}

/* Slides wrapper */
.platform-slideshow__slides {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
}

/* Individual slide */
.platform-slideshow__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
  overflow: visible; /* Ensure cards don't clip */
  margin-bottom: var(--space-4); /* Extra space before dots */
}

/* Active slide */
.platform-slideshow__slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* Content wrapper with minimal gap */
.platform-slideshow__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-6); /* Clear separation between content and nav */
}

/* Image container - No background or borders */
.platform-slideshow__image-container {
  position: relative;
  width: 100%;
  height: 60vh;
  max-height: 400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  border: none;
}

/* Platform architecture image */
.platform-slideshow__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.platform-slideshow__slide.active .platform-slideshow__image {
  transform: scale(1.05);
}

/* Text content - Card container wrapper */
.platform-slideshow__text {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 0;
}

/* Card styling with always-visible orange border */
.platform-slideshow__card {
  text-align: left;
  border: 2px solid var(--medium-gray);
  padding: var(--space-3);
  background: transparent;
  margin-bottom: 0; /* Remove any bottom margin that might interfere */
  overflow: visible; /* Prevent content clipping */
}

.platform-slideshow__card .platform-slideshow__title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
  color: var(--accent-orange);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

.platform-slideshow__card .platform-slideshow__description {
  font-size: 1rem; /* 16px - MINIMUM */
  line-height: 1.4;
  margin: 0;
  color: var(--light-gray);
}

/* Navigation dots - Natural flow positioning below card content */
.platform-slideshow__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8); /* Space between cards and dots */
  position: relative;
  z-index: 10; /* Match working AIP slideshow z-index */
}

/* Mobile adjustments for navigation */
@media (max-width: 767px) {
  .platform-slideshow__nav {
    gap: var(--space-2);
    margin-top: var(--space-6); /* Slightly less margin on mobile */
  }
}

.platform-slideshow__dot {
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: var(--medium-gray);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  padding: 0;
}

.platform-slideshow__dot:hover {
  background: var(--light-gray);
  transform: scale(1.2);
}

.platform-slideshow__dot.active {
  background: var(--accent-orange);
  width: 32px;
  border-radius: 0;
}

.platform-slideshow__dot:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 3px;
}

/* Arrow navigation (optional) */
.platform-slideshow__arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 var(--space-4);
  pointer-events: none;
  z-index: 5;
}

.platform-slideshow__arrow {
  width: 48px;
  height: 48px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid var(--medium-gray);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  pointer-events: all;
  color: var(--text-white);
  font-size: 20px;
}

.platform-slideshow__arrow:hover {
  background: var(--secondary-dark);
  border-color: var(--accent-orange);
  transform: scale(1.1);
}

.platform-slideshow__arrow:focus {
  outline: 2px solid var(--accent-orange);
  outline-offset: 2px;
}

.platform-slideshow__arrow--prev::before {
  content: '←';
}

.platform-slideshow__arrow--next::before {
  content: '→';
}

/* Animation keyframes */
@keyframes platformSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes platformFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Accessibility - reduced motion */
@media (prefers-reduced-motion: reduce) {
  .platform-slideshow__slide,
  .platform-slideshow__image,
  .platform-slideshow__dot,
  .platform-slideshow__arrow {
    transition: none !important;
    animation: none !important;
  }
  
  .platform-slideshow__slide.active .platform-slideshow__image {
    transform: none;
  }
}

/* Focus visible for keyboard navigation */
.platform-slideshow__dot:focus-visible,
.platform-slideshow__arrow:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 3px;
}

/* Loading state */
.platform-slideshow__image.loading {
  opacity: 0.5;
}

/* Error state */
.platform-slideshow__image.error {
  display: none;
}

.platform-slideshow__image.error::after {
  content: 'Image failed to load';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--light-gray);
  font-size: var(--text-sm);
}

/* Tablet styles - Medium sizing (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .platform-slideshow {
    min-height: 550px;
    max-height: 550px;
  }

  .platform-slideshow__content {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .platform-slideshow__text {
    padding: 0;
  }

  .platform-slideshow__image-container {
    height: 400px;
    max-height: 400px;
    width: auto;
    max-width: 500px;
  }
}

/* Desktop styles - Balanced proportions with side-by-side layout */
@media (min-width: 1024px) {
  .platform-slideshow {
    min-height: 600px;
    max-height: 700px;
  }

  .platform-slideshow__content {
    grid-template-columns: 1fr; /* Single column stacked layout */
    gap: var(--space-4); /* Restore gap between image and text */
    align-items: center;
    padding: 0 var(--space-4);
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto; /* Center the content */
  }

  .platform-slideshow__text {
    padding: 0;
    max-width: 600px; /* Maintain readable width */
    margin: 0 auto; /* Center text content */
  }

  .platform-slideshow__arrows {
    padding: 0 var(--space-8);
    top: auto;                    /* Remove center positioning */
    bottom: var(--space-8);       /* Align with dots */
    transform: none;              /* Remove center transform */
  }

  .platform-slideshow__image-container {
    height: 450px;
    max-height: 500px;
    width: 100%;
    max-width: 700px; /* Constrain image width */
    margin: 0 auto; /* Center image */
  }

  .platform-slideshow__nav {
    margin-top: var(--space-6);
  }
}

/* Large desktop styles - Refined proportions */
@media (min-width: 1440px) {
  .platform-slideshow {
    max-height: 650px;
  }

  .platform-slideshow__content {
    grid-template-columns: 1fr; /* Single column stacked layout */
    gap: var(--space-4); /* Maintain gap between image and text */
    max-width: 900px; /* Slightly wider for large screens */
    margin: 0 auto;
  }

  .platform-slideshow__text {
    padding: 0;
    max-width: 700px; /* Slightly wider on large screens */
    margin: 0 auto;
  }

  .platform-slideshow__image-container {
    height: 500px;
    max-height: 500px;
    max-width: 800px; /* Slightly wider on large screens */
    margin: 0 auto;
  }
}

/* QUICK POLISH OVERRIDES */

/* Section padding inherited from main.css - var(--space-section-sm) */

/* Better card appearance */
.category-card {
    background: var(--secondary-dark);
    border: 1px solid var(--medium-gray);
    padding: var(--space-6); /* Reduced from var(--space-8) */
    margin-bottom: var(--space-6);
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

/* Improve bullet points */
.category-bullet__content {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--light-gray);
}

/* Better mobile padding */
@media (max-width: 767px) {
    .category-card {
        padding: var(--space-4);
        margin-bottom: var(--space-4);
    }
    
    .section {
        padding: var(--space-8) 0;
    }
}