/* Network Section Styles */
:root {
  --network-orange: #ff7b00;
  --network-orange-light: #ffb800;
  --network-navy: #0a1628;
  --network-navy-light: #1e3a5f;
  --network-cyan: #00d4ff;
  --network-white: #ffffff;
}

#network-section {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    sans-serif;
  background: linear-gradient(135deg, #0a1628 0%, #1a2332 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Network Section */
.network-section {
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Background effects */
.network-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  background-image: radial-gradient(
      circle at 30% 40%,
      var(--network-orange) 0%,
      transparent 40%
    ),
    radial-gradient(circle at 70% 60%, var(--network-cyan) 0%, transparent 40%);
  pointer-events: none;
}

.network-container-main {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header - Compact */
.network-section-header {
  text-align: center;
  margin-bottom: 1rem;
}

.network-section-header h2 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.network-section-header h2 span {
  background: linear-gradient(
    135deg,
    var(--network-orange),
    var(--network-orange-light)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.network-section-header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
}

/* Selection Counter - Moved lower with more separation */
.network-selection-counter {
  text-align: center;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}

.network-counter-pill {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  background: rgba(255, 123, 0, 0.1);
  border: 1px solid rgba(255, 123, 0, 0.3);
  border-radius: 50px;
  color: var(--network-orange-light);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Main Content Layout - Compact */
.network-content-wrapper {
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 2rem;
  flex: 1;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Network Visualization Container - Reduced Height */
.network-visualization-container {
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG for connections */
.network-connections-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.network-connection-path {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1.5;
  fill: none;
  transition: all 0.5s ease;
}

.network-connection-path.active {
  stroke: rgba(255, 123, 0, 0.4);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px rgba(255, 123, 0, 0.3));
  animation: networkPulseConnection 2s ease-in-out infinite;
}

@keyframes networkPulseConnection {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* City Nodes Container */
.network-nodes-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.network-city-node {
  position: absolute;
  cursor: pointer;
  z-index: 5;
  transition: all 0.3s ease;
}

/* Lima special styling */
.network-city-node#network-lima .network-node-circle {
  background: linear-gradient(
    135deg,
    rgba(255, 123, 0, 0.2),
    rgba(255, 184, 0, 0.15)
  );
  border-color: var(--network-orange);
  box-shadow: 0 0 25px rgba(255, 123, 0, 0.3);
}

.network-city-node#network-lima .network-node-abbr {
  color: var(--network-orange-light);
}

.network-city-node#network-lima .network-city-label {
  color: var(--network-orange-light);
  font-weight: 500;
}

/* Smaller nodes */
.network-node-circle {
  width: 56px;
  height: 56px;
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(20px);
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.network-city-node:hover .network-node-circle {
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

/* Selected city styling */
.network-city-node.selected .network-node-circle {
  background: linear-gradient(
    135deg,
    rgba(255, 123, 0, 0.3),
    rgba(255, 184, 0, 0.2)
  );
  border-color: var(--network-orange);
  box-shadow: 0 0 20px rgba(255, 123, 0, 0.3);
}

.network-city-node.selected .network-node-abbr {
  color: var(--network-orange-light);
}

.network-node-abbr {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.network-city-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.network-city-node.selected .network-city-label {
  color: var(--network-orange-light);
  font-weight: 500;
}

/* Position nodes - Compressed layout */
#network-cancun {
  top: 6%;
  left: 20%;
  transform: translate(-50%, -50%);
}
#network-mexico {
  top: 14%;
  left: 30%;
  transform: translate(-50%, -50%);
}
#network-barbados {
  top: 20%;
  left: 80%;
  transform: translate(-50%, -50%);
}
#network-sanjose {
  top: 28%;
  left: 40%;
  transform: translate(-50%, -50%);
}
#network-panama {
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#network-puntacana {
  top: 22%;
  left: 65%;
  transform: translate(-50%, -50%);
}
#network-bogota {
  top: 46%;
  left: 60%;
  transform: translate(-50%, -50%);
}
#network-quito {
  top: 54%;
  left: 45%;
  transform: translate(-50%, -50%);
}
#network-lima {
  top: 64%;
  left: 35%;
  transform: translate(-50%, -50%);
}
#network-saopaulo {
  top: 74%;
  left: 70%;
  transform: translate(-50%, -50%);
}
#network-santiago {
  top: 86%;
  left: 40%;
  transform: translate(-50%, -50%);
}
#network-buenosaires {
  top: 92%;
  left: 55%;
  transform: translate(-50%, -50%);
}
#network-other {
  top: 50%;
  left: 85%;
  transform: translate(-50%, -50%);
}

/* Other node special styling */
.network-city-node.network-other .network-node-circle {
  border-style: dashed;
  background: rgba(10, 22, 40, 0.6);
}

.network-city-node.network-other .network-node-abbr {
  font-size: 1.2rem;
}

/* Right Panel */
.network-right-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Value Pillars - Compact */
.network-value-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.network-pillar-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.network-pillar-card:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.network-pillar-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.5rem;
}

.network-pillar-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(
    135deg,
    var(--network-orange),
    var(--network-orange-light)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.network-pillar-icon svg {
  width: 19px;
  height: 19px;
  color: white;
}

.network-pillar-card h3 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.network-pillar-card p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  line-height: 1.35;
  margin: 0;
}

/* CTA Button - Compact */
.network-cta {
  text-align: center;
}

.network-btn-primary {
  display: inline-block;
  padding: 0.95rem 1.75rem;
  background: linear-gradient(
    135deg,
    var(--network-orange),
    var(--network-orange-light)
  );
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 123, 0, 0.3);
  width: 100%;
  cursor: pointer;
  border: none;
  text-align: center;
}

.network-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 123, 0, 0.4);
}

.network-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Custom Modal Overlay */
.network-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: networkFadeIn 0.3s ease;
}

.network-modal-overlay.active {
  display: flex;
}

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

.network-modal-content {
  background: rgba(20, 35, 55, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: networkSlideUp 0.3s ease;
}

@keyframes networkSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.network-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.network-modal-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.network-modal-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.network-modal-input {
  width: 100%;
  padding: 1rem;
  background: rgba(10, 22, 40, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.network-modal-input:focus {
  outline: none;
  border-color: var(--network-orange);
  background: rgba(10, 22, 40, 0.8);
  box-shadow: 0 0 20px rgba(255, 123, 0, 0.2);
}

.network-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.network-modal-buttons {
  display: flex;
  gap: 1rem;
}

.network-modal-btn {
  flex: 1;
  padding: 0.9rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.network-modal-btn-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.network-modal-btn-cancel:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
}

.network-modal-btn-confirm {
  background: linear-gradient(
    135deg,
    var(--network-orange),
    var(--network-orange-light)
  );
  color: white;
  box-shadow: 0 8px 25px rgba(255, 123, 0, 0.3);
}

.network-modal-btn-confirm:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 123, 0, 0.4);
}

.network-modal-btn-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 968px) {
  .network-content-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .network-visualization-container {
    height: 420px;
  }

  .network-node-circle {
    width: 48px;
    height: 48px;
  }
}
