/* Use Case Diagrams Section */
.use-case-diagrams-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  position: relative;
  overflow: hidden;
}

.diagrams-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.diagrams-header {
  text-align: center;
  margin-bottom: 4rem;
}

.diagrams-title {
  font-size: 3.2rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.diagrams-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #6610f2);
  border-radius: 2px;
}

.diagrams-subtitle {
  font-size: 1.6rem;
  color: #6c757d;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

.flow-diagrams {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-bottom: 4rem;
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.flow-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.1),
    0 1px 8px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.flow-item.flow-half {
  width: 100%;
}

.flow-item.compact {
  padding: 1.8rem;
}

.flow-item.compact .flow-diagram {
  transform: scale(0.9);
}

.flow-item.compact .device-icon {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
}

.flow-item.compact .device-icon.small {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.flow-item.compact .device-label {
  font-size: 1.3rem;
}
.flow-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.flow-item:hover::before {
  left: 100%;
}

.flow-item:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 5px 15px rgba(0, 0, 0, 0.08);
}

.flow-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

/* Flow Diagrams */
.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-width: 140px;
}

.device-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.device-icon::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.flow-item:hover .device-icon::after {
  opacity: 1;
}

.device-icon.camera {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.device-icon.encoder {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.device-icon.display {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.device-icon.microphone {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.device-icon.dsp {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.device-icon.speakers {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.device-icon.control-panel {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.device-icon.lighting {
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

.device-icon.bridge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.device-icon.small {
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
}

.device-label {
  font-size: 1.6rem;
  font-weight: 500;
  color: #495057;
  text-align: center;
  line-height: 1.3;
}

/* Flow Arrows */
.flow-arrow {
  position: relative;
  flex: 1;
  height: 2px;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #007bff, #6610f2);
  position: relative;
}

.arrow-line::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-50%);
  animation: flowAnimation 2s infinite;
}

@keyframes flowAnimation {
  0% { width: 0; left: 0; }
  50% { width: 30px; left: calc(50% - 15px); }
  100% { width: 0; left: 100%; }
}

.arrow-head {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid #6610f2;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.flow-protocol {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  font-weight: 500;
  color: #6c757d;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Control System Styling */
.control-flow {
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  padding: 2rem;
}

.control-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.control-connections {
  position: absolute;
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}


.controlled-devices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  align-items: center;
  justify-items: center;
}

.controlled-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Platform Integration Styling */
.platform-flow {
  gap: 2rem;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.platform-devices {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.platform-services {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.platform-device,
.platform-service {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.platform-device .device-icon,
.platform-service .service-icon {
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
}

.platform-device .device-label,
.platform-service .service-label {
  font-size: 1.2rem;
}

.platform-arrows {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.platform-arrow {
  width: 30px;
  height: 2px;
  background: linear-gradient(180deg, #007bff, #6610f2);
  position: relative;
}

.platform-arrow::after {
  content: '';
  position: absolute;
  left: 100%;
  width: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 0;
  border-left: 8px solid #6610f2;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.bridge-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.bridge-device .device-icon {
  width: 50px;
  height: 50px;
  font-size: 1.3rem;
}

.bridge-device .device-label {
  font-size: 1.2rem;
}

.platform-arrow-center {
  width: 30px;
  height: 2px;
  background: linear-gradient(180deg, #6610f2, #007bff);
  position: relative;
  margin: 1rem 0;
}

.platform-arrow-center::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #007bff;
  border-top: 6px solid transparent;
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  transition: all 0.3s ease;
}

.platform-service.zoom .service-icon {
  background: linear-gradient(135deg, #2d8cff 0%, #1e6fcc 100%);
}

.platform-service.teams .service-icon {
  background: linear-gradient(135deg, #6264a7 0%, #464775 100%);
}

.platform-service.webex .service-icon {
  background: linear-gradient(135deg, #00bceb 0%, #0099cc 100%);
}

.service-label,
.device-label {
  font-size: 1.6rem;
  font-weight: 500;
  color: #495057;
  text-align: center;
}

/* Diagram Features */
.diagram-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-highlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(0, 123, 255, 0.1);
  transition: all 0.3s ease;
}

.feature-highlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.feature-highlight .feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-highlight .feature-content h4 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
}

.feature-highlight .feature-content p {
  font-size: 1.6rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.4;
}

.flow-item i{
    color: white;
}

.diagram-features .feature-icon i{
    color:white;
}
/* Responsive Design */
@media (max-width: 1200px) {
  .flow-diagrams {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .diagrams-title {
    font-size: 2.8rem;
  }
  
  .flow-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 992px) {
  .use-case-diagrams-section {
    padding: 4rem 0;
  }
  
  .diagrams-container {
    padding: 0 1.5rem;
  }
  
  .flow-row {
    gap: 2rem;
  }
  
  .flow-item {
    padding: 2rem;
  }
  
  .controlled-devices {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .platform-devices,
  .platform-services {
    gap: 1.5rem;
  }
  
  .platform-arrows {
    gap: 1.5rem;
  }
  
  .diagrams-title {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  .diagrams-title {
    font-size: 2rem;
  }
  
  .diagrams-subtitle {
    font-size: 1.6rem;
  }
  
  .flow-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .flow-diagram {
    gap: 3rem;
  }
  
  .flow-arrow {
    min-width: 60px;
  }
  
  .platform-devices,
  .platform-services {
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .platform-flow {
    gap: 1.5rem;
  }
  
  .platform-arrows {
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    margin: 0.5rem 0;
  }
  
  .platform-arrow {
    width: 25px;
    height: 2px;
    background: linear-gradient(180deg, #007bff, #6610f2);
  }
  
  .platform-arrow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid #6610f2;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
  }
  
  .platform-arrow-center {
    width: 25px;
    height: 2px;
    background: linear-gradient(180deg, #6610f2, #007bff);
    margin: 0.5rem 0;
  }
  
  .platform-arrow-center::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid #6610f2;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
  }
  
  .diagram-features {
    grid-template-columns: 1fr;
  }
  
  .feature-highlight {
    flex-direction: column;
    text-align: center;
  }
  
  .flow-title {
    font-size: 1.6rem;
  }
  
  .platform-flow {
    gap: 1.5rem;
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .use-case-diagrams-section {
    padding: 3rem 0;
  }
  
  .diagrams-container {
    padding: 0 1rem;
  }
  
  .flow-item {
    padding: 1.5rem;
  }
  
  .device-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .device-icon.small {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .controlled-devices {
    grid-template-columns: 1fr;
  }
  
  .platform-devices,
  .platform-services {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .platform-arrows {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
  }
  
  .platform-arrow,
  .platform-arrow-center {
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, #007bff, #6610f2);
  }
  
  .platform-arrow::after,
  .platform-arrow-center::after {
    content: '';
    position: absolute;
    top:100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6610f2;
  }
  
  .platform-flow {
    gap: 1rem;
    padding: 0.5rem;
  }
  
  .flow-protocol {
    top: -48px;
    font-size: 1.4rem;
    padding: 2px 6px;
  }

  .flow-diagram.platform-flow{
    gap:1rem;
  }

  .flow-diagram{
    flex-direction: column;
    gap:4rem;
  }
  .flow-arrow{
    transform: rotate(90deg);
  }
}

/* Animation for device icons */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.flow-item:hover .device-icon {
  animation: pulse 1.5s infinite;
}

/* Glow effect for control connections */
.control-line {
  box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
  animation: connectionGlow 3s infinite alternate;
}

@keyframes connectionGlow {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}
